@@ -49,25 +49,25 @@ func Init() {
49
49
// Note: this has to be called explicitly instead of being
50
50
// an init function so it runs after the types package has
51
51
// been properly initialized.
52
- Type = FromReflect (reflect .TypeOf ( abi.Type {} ))
53
- ArrayType = FromReflect (reflect .TypeOf ( abi.ArrayType {} ))
54
- ChanType = FromReflect (reflect .TypeOf ( abi.ChanType {} ))
55
- FuncType = FromReflect (reflect .TypeOf ( abi.FuncType {} ))
56
- InterfaceType = FromReflect (reflect .TypeOf ( abi.InterfaceType {} ))
57
- MapType = FromReflect (reflect .TypeOf ( abi.MapType {} ))
58
- PtrType = FromReflect (reflect .TypeOf ( abi.PtrType {} ))
59
- SliceType = FromReflect (reflect .TypeOf ( abi.SliceType {} ))
60
- StructType = FromReflect (reflect .TypeOf ( abi.StructType {} ))
52
+ Type = FromReflect (reflect .TypeFor [ abi.Type ]( ))
53
+ ArrayType = FromReflect (reflect .TypeFor [ abi.ArrayType ]( ))
54
+ ChanType = FromReflect (reflect .TypeFor [ abi.ChanType ]( ))
55
+ FuncType = FromReflect (reflect .TypeFor [ abi.FuncType ]( ))
56
+ InterfaceType = FromReflect (reflect .TypeFor [ abi.InterfaceType ]( ))
57
+ MapType = FromReflect (reflect .TypeFor [ abi.MapType ]( ))
58
+ PtrType = FromReflect (reflect .TypeFor [ abi.PtrType ]( ))
59
+ SliceType = FromReflect (reflect .TypeFor [ abi.SliceType ]( ))
60
+ StructType = FromReflect (reflect .TypeFor [ abi.StructType ]( ))
61
61
62
- IMethod = FromReflect (reflect .TypeOf ( abi.Imethod {} ))
63
- Method = FromReflect (reflect .TypeOf ( abi.Method {} ))
64
- StructField = FromReflect (reflect .TypeOf ( abi.StructField {} ))
65
- UncommonType = FromReflect (reflect .TypeOf ( abi.UncommonType {} ))
62
+ IMethod = FromReflect (reflect .TypeFor [ abi.Imethod ]( ))
63
+ Method = FromReflect (reflect .TypeFor [ abi.Method ]( ))
64
+ StructField = FromReflect (reflect .TypeFor [ abi.StructField ]( ))
65
+ UncommonType = FromReflect (reflect .TypeFor [ abi.UncommonType ]( ))
66
66
67
- InterfaceSwitch = FromReflect (reflect .TypeOf ( abi.InterfaceSwitch {} ))
68
- TypeAssert = FromReflect (reflect .TypeOf ( abi.TypeAssert {} ))
67
+ InterfaceSwitch = FromReflect (reflect .TypeFor [ abi.InterfaceSwitch ]( ))
68
+ TypeAssert = FromReflect (reflect .TypeFor [ abi.TypeAssert ]( ))
69
69
70
- ITab = FromReflect (reflect .TypeOf ( abi.ITab {} ))
70
+ ITab = FromReflect (reflect .TypeFor [ abi.ITab ]( ))
71
71
72
72
// Make sure abi functions are correct. These functions are used
73
73
// by the linker which doesn't have the ability to do type layout,
0 commit comments