Skip to content

Commit fb69383

Browse files
authored
feat: add getASupertype() predicate in ValueOrRefType.
Add the getASupertype() predicate in ValueOrRefType.
1 parent 5722084 commit fb69383

File tree

1 file changed

+3
-0
lines changed
  • csharp/ql/lib/semmle/code/csharp

1 file changed

+3
-0
lines changed

csharp/ql/lib/semmle/code/csharp/Type.qll

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -138,6 +138,9 @@ class ValueOrRefType extends Type, Attributable, @value_or_ref_type {
138138
/** Gets an immediate subtype of this type, if any. */
139139
ValueOrRefType getASubType() { result.getABaseType() = this }
140140

141+
/** Gets an immediate supertype of this type, if any. */
142+
ValueOrRefType getASupertype() { this.getABaseType() = result }
143+
141144
/** Gets a member of this type, if any. */
142145
Member getAMember() { result.getDeclaringType() = this }
143146

0 commit comments

Comments
 (0)