Skip to content

Commit d9086e6

Browse files
committed
Kotlin: Add test case for internal member accessed from java
1 parent f5d43b8 commit d9086e6

File tree

4 files changed

+26
-0
lines changed

4 files changed

+26
-0
lines changed
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
public class Java {
2+
void javaFun() {
3+
new Kotlin().kotlinFun$main();
4+
}
5+
}
Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
public class Kotlin {
2+
internal fun kotlinFun() {
3+
}
4+
}
Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
isPublic
2+
| Kotlin.kt:2:11:3:2 | kotlinFun$main |
3+
isInternal
4+
| Kotlin.kt:2:11:3:2 | kotlinFun$main |
5+
#select
6+
| Kotlin.kt:2:11:3:2 | kotlinFun$main | final |
7+
| Kotlin.kt:2:11:3:2 | kotlinFun$main | internal |
8+
| Kotlin.kt:2:11:3:2 | kotlinFun$main | public |
Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
import java
2+
3+
from Method m, string s
4+
where m.fromSource() and m.hasModifier(s)
5+
select m, s
6+
7+
query predicate isPublic(Method m) { m.fromSource() and m.isPublic() }
8+
9+
query predicate isInternal(Method m) { m.fromSource() and m.isInternal() }

0 commit comments

Comments
 (0)