Ruby: add RbiInstantiatedType

This commit is contained in:
Asger F
2022-09-27 10:51:29 +02:00
parent 4963835772
commit ea4ba27297

View File

@@ -132,6 +132,9 @@ module Rbi {
}
}
/**
* A use of `T::Hash`.
*/
class RbiHashType extends RbiType, ConstantReadAccessFromT {
RbiHashType() { this.getName() = "Hash" }
@@ -144,6 +147,11 @@ module Rbi {
Expr getValueType() { result = this.getRefNode().getArgument(1) }
}
/** A type instantiated with type arguments, such as `T::Array[String]`. */
class RbiInstantiatedType extends RbiType, ElementReference {
RbiInstantiatedType() { getReceiver() instanceof RbiType }
}
/**
* A call to `T.proc`. This defines a type signature for a proc or block
*/