Skip to content

Commit c7a5f33

Browse files
owen-mcmbg
authored andcommitted
Improve AliasType.getUnderlyingType
Read through as many aliases as possible before getting the underlying type.
1 parent 2d2b532 commit c7a5f33

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

go/ql/lib/semmle/go/Types.qll

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1012,7 +1012,7 @@ class AliasType extends @typealias, CompositeType {
10121012
/** Gets the aliased type (i.e. that appears on the RHS of the alias definition). */
10131013
Type getRhs() { alias_rhs(this, result) }
10141014

1015-
override Type getUnderlyingType() { result = this.getRhs().getUnderlyingType() }
1015+
override Type getUnderlyingType() { result = unalias(this).getUnderlyingType() }
10161016
}
10171017

10181018
/**

0 commit comments

Comments
 (0)