diff options
author | Russ Cox <rsc@golang.org> | 2010-05-20 22:57:08 -0700 |
---|---|---|
committer | Russ Cox <rsc@golang.org> | 2010-05-20 22:57:08 -0700 |
commit | b263d69358269107e24816a1c4457d7e6df93c90 (patch) | |
tree | c9e33bdcddfa36b85a97e6ece0b33c06e67382d6 /test/varerr.go | |
parent | 332aff4c1d05566c722110b2fd871d7d9b08a2ac (diff) | |
download | go-b263d69358269107e24816a1c4457d7e6df93c90.tar.gz |
gc: handle use of builtin function outside function call
tweaks & tests of last bug fix too.
R=ken2
CC=golang-dev
http://codereview.appspot.com/1207044
Diffstat (limited to 'test/varerr.go')
-rw-r--r-- | test/varerr.go | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/test/varerr.go b/test/varerr.go new file mode 100644 index 000000000..32f33ecc7 --- /dev/null +++ b/test/varerr.go @@ -0,0 +1,14 @@ +// errchk $G $D/$F.go + +// Copyright 2010 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() { + _ = asdf // ERROR "undefined: asdf" + + new = 1 // ERROR "use of builtin new not in function call" +} + |