remove the "open" concept from reflect and go with slices and arrays.

the two still share an interface and Kind; that's probably ok but might be worth revisiting.

R=rsc
DELTA=74  (1 added, 8 deleted, 65 changed)
OCL=23416
CL=23418
This commit is contained in:
Rob Pike 2009-01-23 15:56:04 -08:00
parent 88da39feea
commit 9a7332fb5b
5 changed files with 49 additions and 56 deletions

View file

@ -81,7 +81,7 @@ func TypeToString(typ Type, expand bool) string {
return "*" + TypeToString(p.Sub(), false);
case ArrayKind:
a := typ.(ArrayType);
if a.Open() {
if a.IsSlice() {
str = "[]"
} else {
str = "[" + strconv.Itoa64(int64(a.Len())) + "]"