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 {
2424 */
2525 abstract class RbiType extends Expr { }
2626
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 { }
3339
3440 /** A method call where the receiver is `T`. */
3541 private class MethodCallAgainstT extends MethodCall {
You can’t perform that action at this time.
0 commit comments