Skip to content

Commit 87992fa

Browse files
committed
Revert change to hasEmbeddedField
1 parent 5007666 commit 87992fa

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

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

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -485,7 +485,8 @@ class StructType extends @structtype, CompositeType {
485485
*/
486486
private predicate hasEmbeddedField(Type tp, int depth) {
487487
exists(Field f | this.hasFieldCand(_, f, depth, true) |
488-
tp = lookThroughPointerType(f.getType())
488+
tp = f.getType() or
489+
tp = f.getType().(PointerType).getBaseType()
489490
)
490491
}
491492

0 commit comments

Comments
 (0)