File tree Expand file tree Collapse file tree 2 files changed +9
-8
lines changed
lib/codeql/ruby/experimental
test/library-tests/experimental Expand file tree Collapse file tree 2 files changed +9
-8
lines changed Original file line number Diff line number Diff line change @@ -238,13 +238,14 @@ module Rbi {
238
238
/**
239
239
* Gets the method whose type signature is defined by this call.
240
240
*/
241
- Method getAssociatedMethod ( ) {
241
+ ExprCfgNode getAssociatedMethod ( ) {
242
242
result =
243
- min ( ExprCfgNode methodCfgNode , int i |
244
- methodSignatureSuccessorNodeRanked ( this , methodCfgNode , i )
243
+ min ( ExprCfgNode m , int i |
244
+ methodSignatureSuccessorNodeRanked ( this , m , i ) and
245
+ m .getExpr ( ) instanceof MethodBase
245
246
|
246
- methodCfgNode order by i
247
- ) . getExpr ( )
247
+ m order by i
248
+ )
248
249
}
249
250
250
251
/**
@@ -404,13 +405,13 @@ module Rbi {
404
405
405
406
private SignatureCall getOuterMethodSignatureCall ( ) { this = result .getAParameterType ( ) }
406
407
407
- private Method getAssociatedMethod ( ) {
408
+ private ExprCfgNode getAssociatedMethod ( ) {
408
409
result = this .getOuterMethodSignatureCall ( ) .( MethodSignatureCall ) .getAssociatedMethod ( )
409
410
}
410
411
411
412
/** Gets the parameter to which this type applies. */
412
413
NamedParameter getParameter ( ) {
413
- result = this .getAssociatedMethod ( ) .getAParameter ( ) and
414
+ result = this .getAssociatedMethod ( ) .getExpr ( ) . ( MethodBase ) . getAParameter ( ) and
414
415
result .getName ( ) = this .getKey ( ) .getConstantValue ( ) .getStringlikeValue ( )
415
416
}
416
417
}
Original file line number Diff line number Diff line change @@ -42,7 +42,7 @@ query predicate procParameterTypes(
42
42
pc = prtc .getProcCall ( )
43
43
}
44
44
45
- query predicate sigMethods ( MethodSignatureCall sig , Method m ) { m = sig .getAssociatedMethod ( ) }
45
+ query predicate sigMethods ( MethodSignatureCall sig , ExprCfgNode m ) { m = sig .getAssociatedMethod ( ) }
46
46
47
47
query predicate sigAttrReaders ( MethodSignatureCall sig , ExprNodes:: MethodCallCfgNode attr_reader ) {
48
48
attr_reader = sig .getAssociatedAttrReaderCall ( )
You can’t perform that action at this time.
0 commit comments