1
0
mirror of https://github.com/golang/go synced 2024-11-22 11:14:47 -07:00

Don't cast nil to a fixed array type.

R=rsc
DELTA=1  (0 added, 0 deleted, 1 changed)
OCL=31916
CL=31937
This commit is contained in:
Ian Lance Taylor 2009-07-21 14:06:14 -07:00
parent c9399f13f8
commit f0c00f7eee

View 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");