Skip to content

Commit 4ceb2f1

Browse files
committed
Add test
1 parent 2600dcd commit 4ceb2f1

File tree

4 files changed

+43
-0
lines changed

4 files changed

+43
-0
lines changed
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
class Ext : A<String>("Hello") { }
Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
| file:///!unknown-binary-location/A.class:0:0:0:0 | A<String> | file:///!unknown-binary-location/A.class:0:0:0:0 | A<String> |
2+
| file:///!unknown-binary-location/A.class:0:0:0:0 | A<String> | file:///!unknown-binary-location/A.class:0:0:0:0 | getAnonType |
3+
| file:///!unknown-binary-location/If.class:0:0:0:0 | If<String> | file:///!unknown-binary-location/If.class:0:0:0:0 | getX |
4+
| file:///!unknown-binary-location/If.class:0:0:0:0 | If<T> | file:///!unknown-binary-location/If.class:0:0:0:0 | getX |
5+
| other.kt:1:1:1:34 | Ext | other.kt:1:1:1:34 | Ext |
6+
| test.kt:0:0:0:0 | TestKt | test.kt:19:1:19:38 | user |
7+
| test.kt:1:1:5:1 | If | test.kt:3:3:3:11 | getX |
8+
| test.kt:7:1:17:1 | A | test.kt:7:6:17:1 | A |
9+
| test.kt:7:1:17:1 | A | test.kt:9:3:11:3 | anonType |
10+
| test.kt:7:1:17:1 | A | test.kt:9:3:11:3 | getAnonType |
11+
| test.kt:7:1:17:1 | A | test.kt:13:3:15:3 | privateAnonType |
12+
| test.kt:7:1:17:1 | A | test.kt:13:11:15:3 | getPrivateAnonType |
13+
| test.kt:9:18:11:3 | new If<T>(...) { ... } | test.kt:9:18:11:3 | |
14+
| test.kt:9:18:11:3 | new If<T>(...) { ... } | test.kt:10:5:10:22 | x |
15+
| test.kt:9:18:11:3 | new If<T>(...) { ... } | test.kt:10:14:10:22 | getX |
16+
| test.kt:13:33:15:3 | new If<T>(...) { ... } | test.kt:13:33:15:3 | |
17+
| test.kt:13:33:15:3 | new If<T>(...) { ... } | test.kt:14:5:14:22 | x |
18+
| test.kt:13:33:15:3 | new If<T>(...) { ... } | test.kt:14:14:14:22 | getX |
Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
interface If<T> {
2+
3+
val x : T
4+
5+
}
6+
7+
open class A<T>(t: T) {
8+
9+
val anonType = object : If<T> {
10+
override val x = t
11+
}
12+
13+
private val privateAnonType = object : If<T> {
14+
override val x = t
15+
}
16+
17+
}
18+
19+
fun user(x: A<String>) = x.anonType.x
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
import java
2+
3+
from ClassOrInterface ci, Member m
4+
where m = ci.getAMember() and ci.getSourceDeclaration().fromSource()
5+
select ci, m

0 commit comments

Comments
 (0)