]> Cypherpunks repositories - gostls13.git/commitdiff
6g gives no error on "0 != nil"
authorRuss Cox <rsc@golang.org>
Wed, 3 Dec 2008 00:35:00 +0000 (16:35 -0800)
committerRuss Cox <rsc@golang.org>
Wed, 3 Dec 2008 00:35:00 +0000 (16:35 -0800)
R=ken
OCL=20289
CL=20289

test/bugs/bug127.go [new file with mode: 0644]

diff --git a/test/bugs/bug127.go b/test/bugs/bug127.go
new file mode 100644 (file)
index 0000000..a67e851
--- /dev/null
@@ -0,0 +1,12 @@
+// 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
+func main() {
+        var x int64 = 0;
+        println(x != nil);     // ERROR ".*"
+        println(0 != nil);     // ERROR ".*"
+}