File tree Expand file tree Collapse file tree 1 file changed +12
-6
lines changed
ruby/ql/lib/codeql/ruby/experimental Expand file tree Collapse file tree 1 file changed +12
-6
lines changed Original file line number Diff line number Diff line change @@ -24,12 +24,18 @@ module Rbi {
24
24
*/
25
25
abstract class RbiType extends Expr { }
26
26
27
- class ConstantReadAccessAsRbiType extends RbiType {
28
- ConstantReadAccessAsRbiType ( ) {
29
- this instanceof ConstantReadAccess
30
- // TODO: should this class be more restrictive?
31
- }
32
- }
27
+ /**
28
+ * A `ConstantReadAccess` as an RBI type. This is typically a reference to a
29
+ * class or a constant representing a type alias - for example, the read
30
+ * accesses to `MyList1`, `Integer` and `MyList2` in:
31
+ * ```rb
32
+ * class MyList1; end
33
+ * MyList2 = T.type_alias(MyList1)
34
+ * sig { params(l: MyList2).returns(Integer) }
35
+ * def len(l); end
36
+ * ```
37
+ */
38
+ class ConstantReadAccessAsRbiType extends RbiType , ConstantReadAccess { }
33
39
34
40
/** A method call where the receiver is `T`. */
35
41
private class MethodCallAgainstT extends MethodCall {
You can’t perform that action at this time.
0 commit comments