Kotlin: Add a test of recursive instantiations

This used to cause a stack overflow
This commit is contained in:
Ian Lynagh
2022-03-08 15:11:06 +00:00
parent 0d79dfc412
commit 2551bb58da
3 changed files with 22 additions and 0 deletions

View File

@@ -0,0 +1,3 @@
| stackOverflow.kt:2:1:14:1 | MyClass |
| stackOverflow.kt:4:13:12:13 | |
| stackOverflow.kt:5:17:6:17 | SomeClass |

View File

@@ -0,0 +1,5 @@
import java
from Class c
where c.fromSource()
select c

View File

@@ -0,0 +1,14 @@
class MyClass() {
fun f1() {
fun f2() {
class SomeClass {
}
val ml = mutableListOf<SomeClass>()
for (x in ml) {
}
}
}
}