File tree 1 file changed +9
-1
lines changed
rust/ql/lib/codeql/rust/elements/internal
1 file changed +9
-1
lines changed Original file line number Diff line number Diff line change @@ -31,8 +31,9 @@ module Impl {
31
31
* ```
32
32
*/
33
33
class MethodCallExpr extends Generated:: MethodCallExpr {
34
- override Function getStaticTarget ( ) {
34
+ private Function getStaticTargetFrom ( boolean fromSource ) {
35
35
result = resolveMethodCallExpr ( this ) and
36
+ ( if result .fromSource ( ) then fromSource = true else fromSource = false ) and
36
37
(
37
38
// prioritize inherent implementation methods first
38
39
isInherentImplFunction ( result )
@@ -54,6 +55,13 @@ module Impl {
54
55
)
55
56
}
56
57
58
+ override Function getStaticTarget ( ) {
59
+ result = this .getStaticTargetFrom ( true )
60
+ or
61
+ not exists ( this .getStaticTargetFrom ( true ) ) and
62
+ result = this .getStaticTargetFrom ( false )
63
+ }
64
+
57
65
private string toStringPart ( int index ) {
58
66
index = 0 and
59
67
result = this .getReceiver ( ) .toAbbreviatedString ( )
You can’t perform that action at this time.
0 commit comments