The scope rules have been changed to say that labels live in a

separate per-function namespace.

R=gri
DELTA=24  (8 added, 16 deleted, 0 changed)
OCL=19006
CL=19057
This commit is contained in:
Ian Lance Taylor 2008-11-11 18:17:54 -08:00
parent 902a4d5f29
commit a957ceec35
2 changed files with 1 additions and 9 deletions

View File

@ -8,10 +8,5 @@ package main
func main() {
var exit int;
exit: // this shouldn't be legal
exit:
}
/*
Within a scope, an identifier should have only one association - it cannot be
a variable and a label at the same time.
*/

View File

@ -97,9 +97,6 @@ bugs/bug064.go:15: illegal types for operand: CALL
struct { u int; v int }
BUG: compilation should succeed
=========== bugs/bug077.go
BUG: known to succeed incorrectly
=========== bugs/bug080.go
bugs/bug080.go:12: illegal types for operand: CALL
int