Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 2551bb5

Browse files
committed
Kotlin: Add a test of recursive instantiations
This used to cause a stack overflow
1 parent 0d79dfc commit 2551bb5

3 files changed

Lines changed: 22 additions & 0 deletions

File tree

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
| stackOverflow.kt:2:1:14:1 | MyClass |
2+
| stackOverflow.kt:4:13:12:13 | |
3+
| stackOverflow.kt:5:17:6:17 | SomeClass |
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
import java
2+
3+
from Class c
4+
where c.fromSource()
5+
select c
Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
2+
class MyClass() {
3+
fun f1() {
4+
fun f2() {
5+
class SomeClass {
6+
}
7+
8+
val ml = mutableListOf<SomeClass>()
9+
10+
for (x in ml) {
11+
}
12+
}
13+
}
14+
}

0 commit comments

Comments
 (0)