Skip to content

Commit 7bd1612

Browse files
committed
Rust: Use getStaticTarget in type inference test
This fixes a test failure where duplicated functions from extraction caused a bunch of spurious results to pop up
1 parent bc85801 commit 7bd1612

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

rust/ql/test/library-tests/type-inference/main.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -398,7 +398,7 @@ mod impl_overlap {
398398

399399
pub fn f() {
400400
let x = S1;
401-
println!("{:?}", x.common_method()); // $ method=S1::common_method SPURIOUS: method=<S1_as_OverlappingTrait>::common_method
401+
println!("{:?}", x.common_method()); // $ method=S1::common_method
402402
println!("{:?}", x.common_method_2()); // $ method=S1::common_method_2
403403
}
404404
}

rust/ql/test/library-tests/type-inference/type-inference.ql

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ module ResolveTest implements TestSig {
2424
location = source.getLocation() and
2525
element = source.toString()
2626
|
27-
target = resolveMethodCallExpr(source) and
27+
target = source.(MethodCallExpr).getStaticTarget() and
2828
functionHasValue(target, value) and
2929
tag = "method"
3030
or

0 commit comments

Comments
 (0)