When the name bound to a x.(type) type-switch expression is referred to from within a
function literal inside one of the cases, it sees the type of the interface, not the
concrete type of the case.
(That's because processing of the function literal body is deferred until after the type
of the variable x, which was temporarily mutated for each case, has been restored.)
The text was updated successfully, but these errors were encountered: