Descriptioncompiler: Do not declare type switch variable outside case statements. For expressions containing a TypeSwitchGuard with a short variable declaration e.g. var := x.(type), the spec says that var is declared at the beginning of the implicit block for each in each clause. Previously, var was declared in the block for the switch statement and each implicit block, which led to errors if the type case clause referenced a type with a similar name as the declared variable. Fixes golang/go#10047. Patch Set 1 #Patch Set 2 : diff -r d42a0819e2eb https://code.google.com/p/gofrontend #Patch Set 3 : diff -r d42a0819e2eb https://code.google.com/p/gofrontend # Total comments: 4 Patch Set 4 : diff -r d42a0819e2eb https://code.google.com/p/gofrontend #Patch Set 5 : diff -r d42a0819e2eb https://code.google.com/p/gofrontend #
MessagesTotal messages: 7 | |||||||||||||||||||||||||||||||||||||||||||||||||||||||