Why not make it untyped?

package main

type T bool

func f() T {return T(false)}

func main() {
    switch {
    case f(): // invalid case f() in switch (mismatched types T and bool)

You received this message because you are subscribed to the Google Groups 
"golang-nuts" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to golang-nuts+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to