summaryrefslogtreecommitdiff
path: root/test/convlit1.go
diff options
context:
space:
mode:
authorRuss Cox <rsc@golang.org>2008-10-16 15:59:31 -0700
committerRuss Cox <rsc@golang.org>2008-10-16 15:59:31 -0700
commite4def2f9594a39d1cd00a5e72bffe7b9df4a45e0 (patch)
treee0a34202934220fbb1b8af43881269f95e53121e /test/convlit1.go
parente165c282e7d7077fa59e60481408f9b401a05e10 (diff)
downloadgo-e4def2f9594a39d1cd00a5e72bffe7b9df4a45e0.tar.gz
diagnose various conversion problems
R=ken OCL=17320 CL=17320
Diffstat (limited to 'test/convlit1.go')
-rw-r--r--test/convlit1.go15
1 files changed, 15 insertions, 0 deletions
diff --git a/test/convlit1.go b/test/convlit1.go
new file mode 100644
index 000000000..c15bfcb4b
--- /dev/null
+++ b/test/convlit1.go
@@ -0,0 +1,15 @@
+// errchk $G $D/$F.go
+
+// Copyright 2009 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
+
+var a = []int { "a" }; // ERROR "conver"
+var b = int { 1 }; // ERROR "compos"
+
+
+func main() {
+ if sys.argc < 1 { } // ERROR "conver"
+}