aboutsummaryrefslogtreecommitdiff
path: root/gcc/go/go-system.h
diff options
context:
space:
mode:
authorIan Lance Taylor <ian@gcc.gnu.org>2015-03-06 00:27:32 +0000
committerIan Lance Taylor <ian@gcc.gnu.org>2015-03-06 00:27:32 +0000
commitaeb41dc5b633a87d0ebe69ed1ce0b7f0af24fa3e (patch)
tree046f5dcdb454e83a54280fc6fa5bd40a8f864333 /gcc/go/go-system.h
parentc4571e0e36c9ff80c29ad562c779be2e8fa1b6b2 (diff)
downloadgcc-aeb41dc5b633a87d0ebe69ed1ce0b7f0af24fa3e.zip
gcc-aeb41dc5b633a87d0ebe69ed1ce0b7f0af24fa3e.tar.gz
gcc-aeb41dc5b633a87d0ebe69ed1ce0b7f0af24fa3e.tar.bz2
compiler: 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. From-SVN: r221230
Diffstat (limited to 'gcc/go/go-system.h')
0 files changed, 0 insertions, 0 deletions