mirror of
https://github.com/github/codeql.git
synced 2026-04-26 17:25:19 +02:00
Add test for method reference whose LHS has unknown type
This can happen when imports or source classes are missing.
This commit is contained in:
@@ -0,0 +1,2 @@
|
||||
| Test.java:0:0:0:0 | 1 |
|
||||
| Test.java:4:13:4:30 | Unable to extract method reference Unavailable.f()::g with no owner type |
|
||||
@@ -0,0 +1,4 @@
|
||||
import java
|
||||
import semmle.code.java.Diagnostics
|
||||
|
||||
select any(Diagnostic d | not d.toString().matches("Not rewriting trap file for%"))
|
||||
@@ -0,0 +1,7 @@
|
||||
public class Test {
|
||||
|
||||
public static void test() {
|
||||
var x = Unavailable.f()::g;
|
||||
}
|
||||
|
||||
}
|
||||
@@ -0,0 +1 @@
|
||||
//semmle-extractor-options: --no-strict-javac-errors --javac-args -source 17 -target 17
|
||||
Reference in New Issue
Block a user