File tree Expand file tree Collapse file tree 1 file changed +3
-3
lines changed Expand file tree Collapse file tree 1 file changed +3
-3
lines changed Original file line number Diff line number Diff line change @@ -522,14 +522,14 @@ func extractObjectTypes(tw *trap.Writer) {
522
522
// For more information on objects, see:
523
523
// https://github.com/golang/example/blob/master/gotypes/README.md#objects
524
524
func extractObjectType (tw * trap.Writer , obj types.Object , lbl trap.Label ) {
525
- if tp := obj .Type (); tp != nil {
525
+ if tp := obj .Type (); tp != nil && ! isAlias ( tp ) {
526
526
extractType (tw , tp )
527
527
}
528
528
}
529
529
530
530
// emitObjectType emits the type information for a given object
531
531
func emitObjectType (tw * trap.Writer , obj types.Object , lbl trap.Label ) {
532
- if tp := obj .Type (); tp != nil {
532
+ if tp := obj .Type (); tp != nil && ! isAlias ( tp ) {
533
533
dbscheme .ObjectTypesTable .Emit (tw , lbl , extractType (tw , tp ))
534
534
}
535
535
}
@@ -1516,7 +1516,7 @@ func isAlias(tp types.Type) bool {
1516
1516
// If the given type is a type alias, this function resolves it to its underlying type.
1517
1517
func resolveTypeAlias (tp types.Type ) types.Type {
1518
1518
if isAlias (tp ) {
1519
- return tp .Underlying ()
1519
+ return types . Unalias ( tp ) // tp.Underlying()
1520
1520
}
1521
1521
return tp
1522
1522
}
You can’t perform that action at this time.
0 commit comments