aboutsummaryrefslogtreecommitdiff
path: root/test/varerr.go
diff options
context:
space:
mode:
authorRuss Cox <rsc@golang.org>2010-05-20 22:57:08 -0700
committerRuss Cox <rsc@golang.org>2010-05-20 22:57:08 -0700
commit709c5b248115ed8763d876737a6a6104be661211 (patch)
treec28da8454043e0ff5758704036d1e3a0ba31498f /test/varerr.go
parentb03d7f4d8f0fcecb6756d414cc1c0ea9b80e31b6 (diff)
downloadgo-709c5b248115ed8763d876737a6a6104be661211.tar.gz
go-709c5b248115ed8763d876737a6a6104be661211.zip
gc: handle use of builtin function outside function call
tweaks & tests of last bug fix too. R=ken2 CC=golang-dev https://golang.org/cl/1207044
Diffstat (limited to 'test/varerr.go')
-rw-r--r--test/varerr.go14
1 files changed, 14 insertions, 0 deletions
diff --git a/test/varerr.go b/test/varerr.go
new file mode 100644
index 0000000000..32f33ecc77
--- /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"
+}
+