From 5a27079801c60e773a5007841ddcab48aa8c51fb Mon Sep 17 00:00:00 2001 From: Robert Griesemer Date: Mon, 16 Mar 2009 11:21:58 -0700 Subject: [PATCH] spec and implementation disagree with respect to label declarations R=rsc DELTA=19 (19 added, 0 deleted, 0 changed) OCL=26284 CL=26336 --- test/bugs/bug140.go | 18 ++++++++++++++++++ test/golden.out | 5 +++++ 2 files changed, 23 insertions(+) create mode 100644 test/bugs/bug140.go diff --git a/test/bugs/bug140.go b/test/bugs/bug140.go new file mode 100644 index 0000000000..614fabdc30 --- /dev/null +++ b/test/bugs/bug140.go @@ -0,0 +1,18 @@ +// $G $D/$F.go || echo BUG should compile + +// Copyright 2009 The Go Authors. All rights reserved. +// Use of this source code is governed by a BSD-style +// license that can be found in the LICENSE file. + +package main + +func main() { + if {} else L: ; + if {} else L: main() ; +} + +/* +These should be legal according to the spec. +bug140.go:6: syntax error near L +bug140.go:7: syntax error near L +*/ diff --git a/test/golden.out b/test/golden.out index 0d94892cf4..8e4786c3cc 100644 --- a/test/golden.out +++ b/test/golden.out @@ -136,6 +136,11 @@ bugs/bug139.go:7: fatal error: naddr: ONAME class x 5 BUG should compile +=========== bugs/bug140.go +bugs/bug140.go:6: syntax error near L +bugs/bug140.go:7: syntax error near L +BUG should compile + =========== fixedbugs/bug016.go fixedbugs/bug016.go:7: constant -3 overflows uint -- 2.50.0