diff options
author | Russ Cox <rsc@golang.org> | 2011-09-12 15:52:29 -0400 |
---|---|---|
committer | Russ Cox <rsc@golang.org> | 2011-09-12 15:52:29 -0400 |
commit | 9fc687392c215a090b35d6966964990633f40acb (patch) | |
tree | ccccc273ca48c1a8fc2ceaef80986d3e31ce2c80 /test/syntax | |
parent | 48e9c771a1da67e3a20984f322a67fd4e34932a5 (diff) | |
download | go-9fc687392c215a090b35d6966964990633f40acb.tar.gz go-9fc687392c215a090b35d6966964990633f40acb.zip |
gc: clean up if grammar
Fixes #2248.
R=ken2
CC=golang-dev
https://golang.org/cl/4978064
Diffstat (limited to 'test/syntax')
-rw-r--r-- | test/syntax/else.go | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/test/syntax/else.go b/test/syntax/else.go new file mode 100644 index 0000000000..186d5959a8 --- /dev/null +++ b/test/syntax/else.go @@ -0,0 +1,12 @@ +// 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. + +package main + +func main() { + if true { + } else ; // ERROR "else must be followed by if or statement block" +} |