Add names to types to avoid recursive explosion and to get

the right answer when a type name redefines an existing type.

R=rsc
DELTA=133  (53 added, 8 deleted, 72 changed)
OCL=17637
CL=17639
This commit is contained in:
Rob Pike 2008-10-22 13:02:43 -07:00
parent 79985fa569
commit 0061e56196
3 changed files with 111 additions and 66 deletions

View file

@ -9,12 +9,12 @@ import (
)
func typedump(s string) {
t := reflect.ParseTypeString(s);
t := reflect.ParseTypeString("", s);
print(reflect.TypeToString(t),"; size = ", t.Size(), "\n");
}
func valuedump(s string) {
t := reflect.ParseTypeString(s);
t := reflect.ParseTypeString("", s);
v := reflect.NewInitValue(t);
switch v.Kind() {
case reflect.Int8Kind: