mirror of
https://github.com/github/codeql.git
synced 2026-04-28 18:25:24 +02:00
Kotlin: Add a test of recursive instantiations
This used to cause a stack overflow
This commit is contained in:
@@ -0,0 +1,3 @@
|
||||
|
||||
public interface BaseFoo<T, S extends BaseFoo<T, S>> {}
|
||||
|
||||
@@ -0,0 +1,3 @@
|
||||
|
||||
public interface Foo<T> extends BaseFoo<T, Foo<T>> {}
|
||||
|
||||
@@ -0,0 +1,3 @@
|
||||
| test.kt:2:1:11:1 | MyClass |
|
||||
| test.kt:4:13:9:13 | |
|
||||
| test.kt:5:17:6:17 | SomeClass |
|
||||
@@ -0,0 +1,5 @@
|
||||
import java
|
||||
|
||||
from Class c
|
||||
where c.fromSource()
|
||||
select c
|
||||
@@ -0,0 +1,11 @@
|
||||
|
||||
class MyClass() {
|
||||
fun f1() {
|
||||
fun f2() {
|
||||
class SomeClass {
|
||||
}
|
||||
|
||||
val x: Foo<SomeClass>? = null
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user