mirror of
https://github.com/golang/go.git
synced 2025-12-08 06:10:04 +00:00
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:
parent
79985fa569
commit
0061e56196
3 changed files with 111 additions and 66 deletions
|
|
@ -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:
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue