]> Cypherpunks repositories - gostls13.git/commitdiff
Don't cast nil to a fixed array type.
authorIan Lance Taylor <iant@golang.org>
Tue, 21 Jul 2009 21:06:14 +0000 (14:06 -0700)
committerIan Lance Taylor <iant@golang.org>
Tue, 21 Jul 2009 21:06:14 +0000 (14:06 -0700)
R=rsc
DELTA=1  (0 added, 0 deleted, 1 changed)
OCL=31916
CL=31937

src/pkg/reflect/all_test.go

index 83bc6a92f196565e1ae471c5cad96ed0e30abdb4..89e429ec2ef19797f7219fcd7eda4ecbc68249b3 100644 (file)
@@ -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");