Skip to content

Commit ea4ba27

Browse files
committed
Ruby: add RbiInstantiatedType
1 parent 4963835 commit ea4ba27

File tree

1 file changed

+8
-0
lines changed
  • ruby/ql/lib/codeql/ruby/experimental

1 file changed

+8
-0
lines changed

ruby/ql/lib/codeql/ruby/experimental/Rbi.qll

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -132,6 +132,9 @@ module Rbi {
132132
}
133133
}
134134

135+
/**
136+
* A use of `T::Hash`.
137+
*/
135138
class RbiHashType extends RbiType, ConstantReadAccessFromT {
136139
RbiHashType() { this.getName() = "Hash" }
137140

@@ -144,6 +147,11 @@ module Rbi {
144147
Expr getValueType() { result = this.getRefNode().getArgument(1) }
145148
}
146149

150+
/** A type instantiated with type arguments, such as `T::Array[String]`. */
151+
class RbiInstantiatedType extends RbiType, ElementReference {
152+
RbiInstantiatedType() { getReceiver() instanceof RbiType }
153+
}
154+
147155
/**
148156
* A call to `T.proc`. This defines a type signature for a proc or block
149157
*/

0 commit comments

Comments
 (0)