File tree Expand file tree Collapse file tree 2 files changed +9
-2
lines changed Expand file tree Collapse file tree 2 files changed +9
-2
lines changed Original file line number Diff line number Diff line change @@ -1020,7 +1020,6 @@ func (e *extractor) makeType(expr types.Type) (result cueast.Expr) {
1020
1020
}
1021
1021
// Check for builtin packages.
1022
1022
// TODO: replace these literal types with a reference to the fixed
1023
- // builtin type.
1024
1023
switch obj .Type ().String () {
1025
1024
case "time.Time" :
1026
1025
ref := e .ident (e .pkgNames [obj .Pkg ().Path ()].name , false )
@@ -1130,7 +1129,12 @@ func (e *extractor) makeType(expr types.Type) (result cueast.Expr) {
1130
1129
}
1131
1130
1132
1131
case * types.Basic :
1133
- return e .ident (x .String (), false )
1132
+ switch t := x .String (); t {
1133
+ case "uintptr" :
1134
+ return e .ident ("uint64" , false )
1135
+ default :
1136
+ return e .ident (t , false )
1137
+ }
1134
1138
1135
1139
case * types.Interface :
1136
1140
return e .ident ("_" , false )
Original file line number Diff line number Diff line change @@ -63,6 +63,8 @@ type Foozer struct {
63
63
64
64
exclude int
65
65
66
+ Ptr uintptr
67
+
66
68
// Time is mapped to CUE's internal type.
67
69
Time time.Time
68
70
@@ -394,6 +396,7 @@ import (
394
396
AnyJSON: _ @go(,json.Marshaler)
395
397
AnyText: string @go(,encoding.TextMarshaler)
396
398
bar?: int & >10 @go(Bar)
399
+ Ptr: uint64 @go(,uintptr)
397
400
398
401
// Time is mapped to CUE's internal type.
399
402
Time: time.Time
You can’t perform that action at this time.
0 commit comments