Kotlin: Add a test

This caused a stack overflow on a branch, due to the recursino between
the class and the extension function.
This commit is contained in:
Ian Lynagh
2021-12-02 18:26:55 +00:00
parent 9c4c559ab2
commit f0949a4936
3 changed files with 43 additions and 0 deletions

View File

@@ -0,0 +1,27 @@
| file://:0:0:0:0 | |
| test.kt:0:0:0:0 | TestKt |
| test.kt:0:0:0:0 | test |
| test.kt:2:1:4:1 | bar |
| test.kt:2:6:2:6 | T |
| test.kt:2:9:2:14 | <this> |
| test.kt:2:31:4:1 | { ... } |
| test.kt:3:5:3:15 | return ... |
| test.kt:3:12:3:15 | true |
| test.kt:6:1:10:1 | <Expr>; |
| test.kt:6:1:10:1 | <obinit> |
| test.kt:6:1:10:1 | <obinit>(...) |
| test.kt:6:1:10:1 | Foo |
| test.kt:6:1:10:1 | Foo |
| test.kt:6:1:10:1 | equals |
| test.kt:6:1:10:1 | hashCode |
| test.kt:6:1:10:1 | other |
| test.kt:6:1:10:1 | super(...) |
| test.kt:6:1:10:1 | toString |
| test.kt:6:1:10:1 | { ... } |
| test.kt:6:1:10:1 | { ... } |
| test.kt:6:11:6:11 | T |
| test.kt:7:5:9:5 | foo |
| test.kt:7:24:9:5 | { ... } |
| test.kt:8:9:8:20 | return ... |
| test.kt:8:16:8:20 | bar(...) |
| test.kt:8:16:8:20 | this |

View File

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

View File

@@ -0,0 +1,11 @@
fun <T> Foo<T>.bar(): Boolean {
return true
}
class Foo<T> {
fun foo(): Boolean {
return bar()
}
}