mirror of
https://github.com/github/codeql.git
synced 2025-12-22 03:36:30 +01:00
Add test exercising the case of a missing type used as an interface
This induces the TypeEnter phase to create an ErrorType with a parameter, which in turn used to cause a stack overflow in comparing the TypeWrapper objects involved. Note the output remains somewhat broken, exposing an <any> type, but at least the overflow is resolved.
This commit is contained in:
@@ -0,0 +1 @@
|
||||
| Test.java:0:0:0:0 | 1 |
|
||||
@@ -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,3 @@
|
||||
import java
|
||||
|
||||
select any(Expr e | e.getType() instanceof ErrorType)
|
||||
@@ -0,0 +1,6 @@
|
||||
Test.java:
|
||||
# 0| [CompilationUnit] Test
|
||||
# 1| 1: [Class] Test
|
||||
#-----| -1: (Base Types)
|
||||
# 1| 0: [TypeAccess] <any>
|
||||
# 1| 0: [TypeAccess] String
|
||||
@@ -0,0 +1 @@
|
||||
semmle/code/java/PrintAst.ql
|
||||
@@ -0,0 +1 @@
|
||||
public class Test implements Unavailable<String> { }
|
||||
1
java/ql/test/library-tests/errortype-with-params/options
Normal file
1
java/ql/test/library-tests/errortype-with-params/options
Normal file
@@ -0,0 +1 @@
|
||||
//semmle-extractor-options: --no-strict-javac-errors --javac-args -source 17 -target 17
|
||||
Reference in New Issue
Block a user