diff options
author | Russ Cox <rsc@golang.org> | 2011-02-22 18:23:29 -0500 |
---|---|---|
committer | Russ Cox <rsc@golang.org> | 2011-02-22 18:23:29 -0500 |
commit | 52943bfe4d1a85e64e35a5c1173ce04ae2b98bb6 (patch) | |
tree | 23eb603c179c831ce8fe135d8db4482442764c1c /test/syntax | |
parent | 814075dffba9c3f906d9ba641e787a35289a2f86 (diff) | |
download | go-52943bfe4d1a85e64e35a5c1173ce04ae2b98bb6.tar.gz go-52943bfe4d1a85e64e35a5c1173ce04ae2b98bb6.zip |
gc: require if condition
R=ken2, r2
CC=golang-dev
https://golang.org/cl/4195045
Diffstat (limited to 'test/syntax')
-rw-r--r-- | test/syntax/if.go | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/test/syntax/if.go b/test/syntax/if.go new file mode 100644 index 0000000000..913d418854 --- /dev/null +++ b/test/syntax/if.go @@ -0,0 +1,15 @@ +// 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 { // ERROR "missing condition" + } + + if x(); { // ERROR "missing condition" + } +} |