Kotlin: Add a test for file classes

This commit is contained in:
Ian Lynagh
2023-07-11 13:21:56 +01:00
parent 1af60aa9d4
commit c21797dd3c
5 changed files with 16 additions and 0 deletions

View File

@@ -0,0 +1,2 @@
fun a() {
}

View File

@@ -0,0 +1,3 @@
fun b() {
a()
}

View File

@@ -0,0 +1,3 @@
class C {
fun c() {}
}

View File

@@ -0,0 +1,3 @@
| A.kt:0:0:0:0 | AKt | true |
| B.kt:0:0:0:0 | BKt | true |
| C.kt:1:1:3:1 | C | false |

View File

@@ -0,0 +1,5 @@
import java
from Class c
where c.fromSource()
select c, any(boolean b | if c.isFileClass() then b = true else b = false)