summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorIan Lance Taylor <iant@golang.org>2009-07-21 14:06:14 -0700
committerIan Lance Taylor <iant@golang.org>2009-07-21 14:06:14 -0700
commit80ea39bd8713a7e674ef4b81ffb373b7110e59b4 (patch)
tree1f0f1718fe9dde1c1790ad7e5accbeb6dac3dbf0
parent0a8be901604c6cadc8f008824bd1b98766466396 (diff)
downloadgolang-80ea39bd8713a7e674ef4b81ffb373b7110e59b4.tar.gz
Don't cast nil to a fixed array type.
R=rsc DELTA=1 (0 added, 0 deleted, 1 changed) OCL=31916 CL=31937
-rw-r--r--src/pkg/reflect/all_test.go2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/pkg/reflect/all_test.go b/src/pkg/reflect/all_test.go
index 83bc6a92f..89e429ec2 100644
--- a/src/pkg/reflect/all_test.go
+++ b/src/pkg/reflect/all_test.go
@@ -226,7 +226,7 @@ func TestAll(t *testing.T) { // TODO(r): wrap up better
t.Errorf("FieldByName says absent field is present");
}
- typ = Typeof(([32]int32)(nil));
+ typ = Typeof([32]int32{});
testType(t, 7, typ, "[32]int32");
testType(t, 8, typ.(*ArrayType).Elem(), "int32");