From: Ian Lance Taylor Date: Tue, 21 Jul 2009 21:06:14 +0000 (-0700) Subject: Don't cast nil to a fixed array type. X-Git-Tag: weekly.2009-11-06~1084 X-Git-Url: http://www.git.cypherpunks.su/?a=commitdiff_plain;h=f0c00f7eee25b50d667d6974af1fee15554b7ec6;p=gostls13.git Don't cast nil to a fixed array type. R=rsc DELTA=1 (0 added, 0 deleted, 1 changed) OCL=31916 CL=31937 --- diff --git a/src/pkg/reflect/all_test.go b/src/pkg/reflect/all_test.go index 83bc6a92f1..89e429ec2e 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");