mirror of
https://github.com/golang/go.git
synced 2025-12-08 06:10:04 +00:00
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:
parent
88da39feea
commit
9a7332fb5b
5 changed files with 49 additions and 56 deletions
|
|
@ -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())) + "]"
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue