File tree Expand file tree Collapse file tree 3 files changed +8
-29
lines changed
test/library-tests/experimental Expand file tree Collapse file tree 3 files changed +8
-29
lines changed Original file line number Diff line number Diff line change @@ -751,23 +751,4 @@ module ExprNodes {
751
751
/** Gets a pair of this hash literal. */
752
752
PairCfgNode getAKeyValuePair ( ) { result = this .getAnArgument ( ) }
753
753
}
754
-
755
- private class CallableExprChildMapping extends ExprChildMapping , Callable {
756
- // TODO: parameters?, callable body?
757
- override predicate relevantChild ( AstNode n ) { none ( ) }
758
- }
759
-
760
- /** A control-flow node that wraps a `Callable` AST expression. */
761
- class CallableCfgNode extends ExprCfgNode {
762
- override CallableExprChildMapping e ;
763
-
764
- override Callable getExpr ( ) { result = super .getExpr ( ) }
765
- }
766
-
767
- /** A control-flow node that wraps a `MethodBase` AST expression. */
768
- class MethodBaseCfgNode extends CallableCfgNode {
769
- MethodBaseCfgNode ( ) { super .getExpr ( ) instanceof MethodBase }
770
-
771
- override MethodBase getExpr ( ) { result = super .getExpr ( ) }
772
- }
773
754
}
Original file line number Diff line number Diff line change @@ -231,13 +231,13 @@ module Rbi {
231
231
/**
232
232
* Gets the method whose type signature is defined by this call.
233
233
*/
234
- ExprNodes :: MethodBaseCfgNode getAssociatedMethod ( ) {
234
+ Method getAssociatedMethod ( ) {
235
235
result =
236
- min ( ExprNodes :: MethodBaseCfgNode m , int i |
237
- methodSignatureSuccessorNodeRanked ( this , m , i )
236
+ min ( ExprCfgNode methodCfgNode , int i |
237
+ methodSignatureSuccessorNodeRanked ( this , methodCfgNode , i )
238
238
|
239
- m order by i
240
- )
239
+ methodCfgNode order by i
240
+ ) . getExpr ( )
241
241
}
242
242
243
243
/**
@@ -397,13 +397,13 @@ module Rbi {
397
397
398
398
private SignatureCall getOuterMethodSignatureCall ( ) { this = result .getAParameterType ( ) }
399
399
400
- private ExprNodes :: MethodBaseCfgNode getAssociatedMethod ( ) {
400
+ private Method getAssociatedMethod ( ) {
401
401
result = this .getOuterMethodSignatureCall ( ) .( MethodSignatureCall ) .getAssociatedMethod ( )
402
402
}
403
403
404
404
/** Gets the parameter to which this type applies. */
405
405
NamedParameter getParameter ( ) {
406
- result = this .getAssociatedMethod ( ) .getExpr ( ) . getAParameter ( ) and
406
+ result = this .getAssociatedMethod ( ) .getAParameter ( ) and
407
407
result .getName ( ) = this .getKey ( ) .getConstantValue ( ) .getStringlikeValue ( )
408
408
}
409
409
}
Original file line number Diff line number Diff line change @@ -43,9 +43,7 @@ query predicate procParameterTypes(
43
43
pc = prtc .getProcCall ( )
44
44
}
45
45
46
- query predicate sigMethods ( MethodSignatureCall sig , ExprNodes:: MethodBaseCfgNode m ) {
47
- m = sig .getAssociatedMethod ( )
48
- }
46
+ query predicate sigMethods ( MethodSignatureCall sig , Method m ) { m = sig .getAssociatedMethod ( ) }
49
47
50
48
query predicate sigAttrReaders ( MethodSignatureCall sig , ExprNodes:: MethodCallCfgNode attr_reader ) {
51
49
attr_reader = sig .getAssociatedAttrReaderCall ( )
You can’t perform that action at this time.
0 commit comments