It seem a float64 of value 0.0 as types interface{} can't be compared equal 
to 0 in an exhaustive case clause type list, but can be compared equal in 
almost any other scenario.

https://play.golang.org/p/t2u2GGp565

I find this unexpected. Could someone explain how case clause type lists in 
type assertions work?

The language specification states:

> In clauses with a case listing exactly one type, the variable has that 
type; otherwise, the variable has the type of the expression in the 
TypeSwitchGuard.

In the provided playground is no TypeSwitchGuard given, so this rule should 
not affect behaviour.


-- 
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