]> Cypherpunks repositories - gostls13.git/commitdiff
bug170; fix test for bug175
authorRuss Cox <rsc@golang.org>
Tue, 28 Jul 2009 00:24:07 +0000 (17:24 -0700)
committerRuss Cox <rsc@golang.org>
Tue, 28 Jul 2009 00:24:07 +0000 (17:24 -0700)
R=ken
OCL=32255
CL=32255

src/cmd/gc/const.c
test/fixedbugs/bug170.go [moved from test/bugs/bug170.go with 100% similarity]
test/golden.out

index 73a23bf83a6aa1adc3ac53774d51319dc3431f2d..68d741223018467450e0e1e9f61700c64a453dcc 100644 (file)
@@ -145,10 +145,14 @@ convlit1(Node **np, Type *t, int explicit)
                        // let normal conversion code handle it
                        return;
 
+               case TARRAY:
+                       if(!isslice(t))
+                               goto bad;
+                       break;
+
                case TPTR32:
                case TPTR64:
                case TINTER:
-               case TARRAY:
                case TMAP:
                case TCHAN:
                case TFUNC:
similarity index 100%
rename from test/bugs/bug170.go
rename to test/fixedbugs/bug170.go
index 605a9b31acd41de752541792fd802809388ba135..8f50536e09632ff11be16e0a61efd620233d2eaa 100644 (file)
@@ -109,9 +109,6 @@ BUG: should fail
 =========== bugs/bug169.go
 BUG: errchk: command succeeded unexpectedly
 
-=========== bugs/bug170.go
-BUG: errchk: command succeeded unexpectedly
-
 =========== fixedbugs/bug016.go
 fixedbugs/bug016.go:7: constant -3 overflows uint
 
@@ -235,9 +232,3 @@ fixedbugs/bug131.go:7: illegal types for operand: AS
 fixedbugs/bug133.dir/bug2.go:11: undefined: bug0.T field i
 fixedbugs/bug133.dir/bug2.go:11: illegal types for operand: RETURN
        int
-
-=========== fixedbugs/bug175.go
-fixedbugs/bug175.go:8: use of multi func value as single value in :=
-fixedbugs/bug175.go:8: undefined: x
-fixedbugs/bug175.go:8: illegal types for operand: AS
-       (int, bool)