diff options
author | Scott Lawrence <bytbox@gmail.com> | 2012-01-16 18:12:25 -0500 |
---|---|---|
committer | Scott Lawrence <bytbox@gmail.com> | 2012-01-16 18:12:25 -0500 |
commit | 41220ae014303b00799cf173ee51a1ef6102c938 (patch) | |
tree | 58a58c9e4d3462db06dfdb306bce023644e69862 /test/fixedbugs/bug394.go | |
parent | 700e0b675382742c71cbdd7eba7b5929e9ccf5bb (diff) | |
download | go-41220ae014303b00799cf173ee51a1ef6102c938.tar.gz |
gc: don't fault on return outside function
Fixes issue 2598.
R=golang-dev, ality, minux.ma, mpimenov, rsc
CC=golang-dev
http://codereview.appspot.com/5510043
Committer: Russ Cox <rsc@golang.org>
Diffstat (limited to 'test/fixedbugs/bug394.go')
-rw-r--r-- | test/fixedbugs/bug394.go | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/test/fixedbugs/bug394.go b/test/fixedbugs/bug394.go new file mode 100644 index 000000000..4d0f090bc --- /dev/null +++ b/test/fixedbugs/bug394.go @@ -0,0 +1,10 @@ +// errchk $G $D/$F.go + +// Copyright 2011 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. + +// Issue 2598 +package foo + +return nil // ERROR "non-declaration statement outside function body" |