File tree Expand file tree Collapse file tree 1 file changed +9
-1
lines changed
rust/ql/lib/codeql/rust/elements/internal Expand file tree Collapse file tree 1 file changed +9
-1
lines changed Original file line number Diff line number Diff line change @@ -31,8 +31,9 @@ module Impl {
3131 * ```
3232 */
3333 class MethodCallExpr extends Generated:: MethodCallExpr {
34- override Function getStaticTarget ( ) {
34+ private Function getStaticTargetFrom ( boolean fromSource ) {
3535 result = resolveMethodCallExpr ( this ) and
36+ ( if result .fromSource ( ) then fromSource = true else fromSource = false ) and
3637 (
3738 // prioritize inherent implementation methods first
3839 isInherentImplFunction ( result )
@@ -54,6 +55,13 @@ module Impl {
5455 )
5556 }
5657
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+
5765 private string toStringPart ( int index ) {
5866 index = 0 and
5967 result = this .getReceiver ( ) .toAbbreviatedString ( )
You can’t perform that action at this time.
0 commit comments