From b7dd312c93e6306db00eca1cfee37937a6c68395 Mon Sep 17 00:00:00 2001 From: Russ Cox Date: Mon, 27 Jul 2009 17:24:07 -0700 Subject: [PATCH] bug170; fix test for bug175 R=ken OCL=32255 CL=32255 --- src/cmd/gc/const.c | 6 +++++- test/{bugs => fixedbugs}/bug170.go | 0 test/golden.out | 9 --------- 3 files changed, 5 insertions(+), 10 deletions(-) rename test/{bugs => fixedbugs}/bug170.go (100%) diff --git a/src/cmd/gc/const.c b/src/cmd/gc/const.c index 73a23bf83a6..68d74122301 100644 --- a/src/cmd/gc/const.c +++ b/src/cmd/gc/const.c @@ -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: diff --git a/test/bugs/bug170.go b/test/fixedbugs/bug170.go similarity index 100% rename from test/bugs/bug170.go rename to test/fixedbugs/bug170.go diff --git a/test/golden.out b/test/golden.out index 605a9b31acd..8f50536e096 100644 --- a/test/golden.out +++ b/test/golden.out @@ -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)