Kotlin: Add test case with various nested generics

This commit is contained in:
Tamas Vajk
2022-09-09 11:06:29 +02:00
parent ac307137ad
commit 3267d7c96e
13 changed files with 303 additions and 0 deletions

View File

@@ -0,0 +1 @@
| Type Cl1 uses out-of-scope type variable U2. Note the Java extractor is known to sometimes do this; the Kotlin extractor should not. |

View File

@@ -498,6 +498,66 @@ classes.kt:
# 127| 1: [ExprStmt] <Expr>;
# 127| 0: [ClassInstanceExpr] new (...)
# 127| -3: [TypeAccess] Object
# 138| 25: [Class,GenericType,ParameterizedType] Cl0
#-----| -2: (Generic Parameters)
# 138| 0: [TypeVariable] U0
# 138| 1: [Constructor] Cl0
# 138| 5: [BlockStmt] { ... }
# 138| 0: [SuperConstructorInvocationStmt] super(...)
# 138| 1: [BlockStmt] { ... }
# 139| 2: [Method] func1
#-----| 2: (Generic Parameters)
# 139| 0: [TypeVariable] U1
# 139| 3: [TypeAccess] Unit
# 139| 5: [BlockStmt] { ... }
# 140| 0: [LocalTypeDeclStmt] class ...
# 140| 0: [LocalClass]
# 140| 1: [Constructor]
# 140| 5: [BlockStmt] { ... }
# 140| 0: [SuperConstructorInvocationStmt] super(...)
# 140| 2: [Method] func2
#-----| 2: (Generic Parameters)
# 140| 0: [TypeVariable] U2
# 140| 3: [TypeAccess] Unit
# 140| 5: [BlockStmt] { ... }
# 141| 0: [LocalTypeDeclStmt] class ...
# 141| 0: [Class,GenericType,LocalClass,ParameterizedType] Cl1
#-----| -2: (Generic Parameters)
# 141| 0: [TypeVariable] U3
# 141| 1: [Constructor] Cl1
# 141| 5: [BlockStmt] { ... }
# 141| 0: [SuperConstructorInvocationStmt] super(...)
# 141| 1: [BlockStmt] { ... }
# 142| 2: [Method] fn
# 142| 3: [TypeAccess] Unit
# 142| 5: [BlockStmt] { ... }
# 143| 0: [LocalVariableDeclStmt] var ...;
# 143| 1: [LocalVariableDeclExpr] x
# 143| 0: [ClassInstanceExpr] new Cl1<U3>(...)
# 143| -3: [TypeAccess] Cl1<U3>
# 143| 0: [TypeAccess] U3
# 150| 26: [Class,GenericType,ParameterizedType] Cl00
#-----| -2: (Generic Parameters)
# 150| 0: [TypeVariable] U0
# 150| 1: [Constructor] Cl00
# 150| 5: [BlockStmt] { ... }
# 150| 0: [SuperConstructorInvocationStmt] super(...)
# 150| 1: [BlockStmt] { ... }
# 151| 2: [Class,GenericType,ParameterizedType] Cl01
#-----| -2: (Generic Parameters)
# 151| 0: [TypeVariable] U1
# 151| 1: [Constructor] Cl01
# 151| 5: [BlockStmt] { ... }
# 151| 0: [SuperConstructorInvocationStmt] super(...)
# 151| 1: [BlockStmt] { ... }
# 152| 2: [Method] fn
# 152| 3: [TypeAccess] Unit
# 152| 5: [BlockStmt] { ... }
# 153| 0: [LocalVariableDeclStmt] var ...;
# 153| 1: [LocalVariableDeclExpr] x
# 153| 0: [ClassInstanceExpr] new Cl01(...)
# 153| -3: [TypeAccess] Cl01
# 153| 0: [TypeAccess] U1
generic_anonymous.kt:
# 0| [CompilationUnit] generic_anonymous
# 0| 1: [Class] Generic_anonymousKt
@@ -592,6 +652,114 @@ generic_anonymous.kt:
# 7| 0: [MethodAccess] getMember(...)
# 7| -1: [MethodAccess] getX$private(...)
# 7| -1: [ThisAccess] this
# 15| 3: [Class,GenericType,ParameterizedType] Outer
#-----| -2: (Generic Parameters)
# 15| 0: [TypeVariable] T0
# 15| 6: [Constructor] Outer
# 15| 5: [BlockStmt] { ... }
# 15| 0: [SuperConstructorInvocationStmt] super(...)
# 15| 1: [BlockStmt] { ... }
# 16| 7: [GenericType,Interface,ParameterizedType] C0
#-----| -2: (Generic Parameters)
# 16| 0: [TypeVariable] T0
# 17| 1: [Method] fn0
# 17| 3: [TypeAccess] T0
# 17| 5: [BlockStmt] { ... }
# 17| 0: [ReturnStmt] return ...
# 17| 0: [NullLiteral] null
# 20| 8: [GenericType,Interface,ParameterizedType] C1
#-----| -2: (Generic Parameters)
# 20| 0: [TypeVariable] T1
# 21| 1: [Method] fn1
# 21| 3: [TypeAccess] T1
# 21| 5: [BlockStmt] { ... }
# 21| 0: [ReturnStmt] return ...
# 21| 0: [NullLiteral] null
# 24| 9: [Method] func1
#-----| 2: (Generic Parameters)
# 24| 0: [TypeVariable] U2
# 24| 3: [TypeAccess] Unit
# 24| 5: [BlockStmt] { ... }
# 25| 0: [LocalTypeDeclStmt] class ...
# 25| 0: [LocalClass]
# 25| 1: [Constructor]
# 25| 5: [BlockStmt] { ... }
# 25| 0: [SuperConstructorInvocationStmt] super(...)
# 25| 2: [Method] func2
#-----| 2: (Generic Parameters)
# 25| 0: [TypeVariable] U3
# 25| 3: [TypeAccess] Unit
# 25| 5: [BlockStmt] { ... }
# 26| 0: [ExprStmt] <Expr>;
# 26| 0: [ImplicitCoercionToUnitExpr] <implicit coercion to unit>
# 26| 0: [TypeAccess] Unit
# 26| 1: [StmtExpr] <Stmt>
# 26| 0: [BlockStmt] { ... }
# 26| 0: [LocalTypeDeclStmt] class ...
# 26| 0: [AnonymousClass,LocalClass] new Object(...) { ... }
# 26| 1: [Constructor]
# 26| 5: [BlockStmt] { ... }
# 26| 0: [SuperConstructorInvocationStmt] super(...)
# 26| 1: [BlockStmt] { ... }
# 26| 1: [ExprStmt] <Expr>;
# 26| 0: [ClassInstanceExpr] new (...)
# 26| -3: [TypeAccess] Object
# 27| 1: [ExprStmt] <Expr>;
# 27| 0: [ImplicitCoercionToUnitExpr] <implicit coercion to unit>
# 27| 0: [TypeAccess] Unit
# 27| 1: [StmtExpr] <Stmt>
# 27| 0: [BlockStmt] { ... }
# 27| 0: [LocalTypeDeclStmt] class ...
# 27| 0: [AnonymousClass,LocalClass] new Object(...) { ... }
# 27| 1: [Constructor]
# 27| 5: [BlockStmt] { ... }
# 27| 0: [SuperConstructorInvocationStmt] super(...)
# 27| 1: [BlockStmt] { ... }
# 27| 1: [ExprStmt] <Expr>;
# 27| 0: [ClassInstanceExpr] new (...)
# 27| -3: [TypeAccess] Object
# 28| 2: [ExprStmt] <Expr>;
# 28| 0: [ImplicitCoercionToUnitExpr] <implicit coercion to unit>
# 28| 0: [TypeAccess] Unit
# 28| 1: [StmtExpr] <Stmt>
# 28| 0: [BlockStmt] { ... }
# 28| 0: [LocalTypeDeclStmt] class ...
# 28| 0: [AnonymousClass,LocalClass] new Object(...) { ... }
# 28| 1: [Constructor]
# 28| 5: [BlockStmt] { ... }
# 28| 0: [SuperConstructorInvocationStmt] super(...)
# 28| 1: [BlockStmt] { ... }
# 28| 1: [ExprStmt] <Expr>;
# 28| 0: [ClassInstanceExpr] new (...)
# 28| -3: [TypeAccess] Object
# 29| 3: [ExprStmt] <Expr>;
# 29| 0: [ImplicitCoercionToUnitExpr] <implicit coercion to unit>
# 29| 0: [TypeAccess] Unit
# 29| 1: [StmtExpr] <Stmt>
# 29| 0: [BlockStmt] { ... }
# 29| 0: [LocalTypeDeclStmt] class ...
# 29| 0: [AnonymousClass,LocalClass] new C0<U2>(...) { ... }
# 29| 1: [Constructor]
# 29| 5: [BlockStmt] { ... }
# 29| 0: [SuperConstructorInvocationStmt] super(...)
# 29| 1: [BlockStmt] { ... }
# 29| 1: [ExprStmt] <Expr>;
# 29| 0: [ClassInstanceExpr] new (...)
# 29| -3: [TypeAccess] C0<U2>
# 30| 4: [ExprStmt] <Expr>;
# 30| 0: [ImplicitCoercionToUnitExpr] <implicit coercion to unit>
# 30| 0: [TypeAccess] Unit
# 30| 1: [StmtExpr] <Stmt>
# 30| 0: [BlockStmt] { ... }
# 30| 0: [LocalTypeDeclStmt] class ...
# 30| 0: [AnonymousClass,LocalClass] new C0<String>(...) { ... }
# 30| 1: [Constructor]
# 30| 5: [BlockStmt] { ... }
# 30| 0: [SuperConstructorInvocationStmt] super(...)
# 30| 1: [BlockStmt] { ... }
# 30| 1: [ExprStmt] <Expr>;
# 30| 0: [ClassInstanceExpr] new (...)
# 30| -3: [TypeAccess] C0<String>
localClassField.kt:
# 0| [CompilationUnit] localClassField
# 1| 1: [Class] A

View File

@@ -7,6 +7,11 @@
| classes.kt:89:16:89:44 | new Interface3<Integer>(...) { ... } | classes.kt:89:16:89:44 | new (...) | | classes.kt:89:16:89:44 | Interface3<Integer> | classes.kt:89:16:89:44 | class ... |
| classes.kt:127:16:134:9 | new Object(...) { ... } | classes.kt:127:16:134:9 | new (...) | | classes.kt:127:16:134:9 | Object | classes.kt:127:16:134:9 | class ... |
| generic_anonymous.kt:3:19:5:3 | new Object(...) { ... } | generic_anonymous.kt:3:19:5:3 | new (...) | | generic_anonymous.kt:3:19:5:3 | Object | generic_anonymous.kt:3:19:5:3 | class ... |
| generic_anonymous.kt:26:13:26:37 | new Object(...) { ... } | generic_anonymous.kt:26:13:26:37 | new (...) | | generic_anonymous.kt:26:13:26:37 | Object | generic_anonymous.kt:26:13:26:37 | class ... |
| generic_anonymous.kt:27:13:27:37 | new Object(...) { ... } | generic_anonymous.kt:27:13:27:37 | new (...) | | generic_anonymous.kt:27:13:27:37 | Object | generic_anonymous.kt:27:13:27:37 | class ... |
| generic_anonymous.kt:28:13:28:41 | new Object(...) { ... } | generic_anonymous.kt:28:13:28:41 | new (...) | | generic_anonymous.kt:28:13:28:41 | Object | generic_anonymous.kt:28:13:28:41 | class ... |
| generic_anonymous.kt:29:13:29:29 | new C0<U2>(...) { ... } | generic_anonymous.kt:29:13:29:29 | new (...) | | generic_anonymous.kt:29:13:29:29 | C0<U2> | generic_anonymous.kt:29:13:29:29 | class ... |
| generic_anonymous.kt:30:13:30:33 | new C0<String>(...) { ... } | generic_anonymous.kt:30:13:30:33 | new (...) | | generic_anonymous.kt:30:13:30:33 | C0<String> | generic_anonymous.kt:30:13:30:33 | class ... |
| local_anonymous.kt:5:16:7:9 | new Object(...) { ... } | local_anonymous.kt:5:16:7:9 | new (...) | | local_anonymous.kt:5:16:7:9 | Object | local_anonymous.kt:5:16:7:9 | class ... |
| local_anonymous.kt:29:31:35:5 | new Object(...) { ... } | local_anonymous.kt:29:31:35:5 | new (...) | | local_anonymous.kt:29:31:35:5 | Object | local_anonymous.kt:29:31:35:5 | class ... |
| local_anonymous.kt:40:14:44:5 | new Interface2(...) { ... } | local_anonymous.kt:40:14:44:5 | new (...) | | local_anonymous.kt:40:14:44:5 | Interface2 | local_anonymous.kt:40:14:44:5 | class ... |

View File

@@ -34,9 +34,21 @@
| classes.kt:119:13:121:13 | Local2 | C1$Local2 | final, private |
| classes.kt:127:16:134:9 | new Object(...) { ... } | <anonymous class> | final, private |
| classes.kt:129:17:131:17 | Local3 | C1$$Local3 | final, private |
| classes.kt:138:1:148:1 | Cl0 | Cl0 | final, public |
| classes.kt:140:9:146:9 | | Cl0$ | final, private |
| classes.kt:141:13:145:13 | Cl1 | Cl0$Cl1 | final, private |
| classes.kt:150:1:156:1 | Cl00 | Cl00 | final, public |
| classes.kt:151:5:155:5 | Cl01 | Cl00$Cl01 | final, public |
| generic_anonymous.kt:0:0:0:0 | Generic_anonymousKt | Generic_anonymousKt | final, public |
| generic_anonymous.kt:1:1:9:1 | Generic | Generic | final, private |
| generic_anonymous.kt:3:19:5:3 | new Object(...) { ... } | <anonymous class> | final, private |
| generic_anonymous.kt:15:1:33:1 | Outer | Outer | final, public |
| generic_anonymous.kt:25:9:31:9 | | Outer$ | final, private |
| generic_anonymous.kt:26:13:26:37 | new Object(...) { ... } | <anonymous class> | final, private |
| generic_anonymous.kt:27:13:27:37 | new Object(...) { ... } | <anonymous class> | final, private |
| generic_anonymous.kt:28:13:28:41 | new Object(...) { ... } | <anonymous class> | final, private |
| generic_anonymous.kt:29:13:29:29 | new C0<U2>(...) { ... } | <anonymous class> | final, private |
| generic_anonymous.kt:30:13:30:33 | new C0<String>(...) { ... } | <anonymous class> | final, private |
| localClassField.kt:1:1:11:1 | A | A | final, public |
| localClassField.kt:3:9:3:19 | L | A$L | final, private |
| localClassField.kt:8:9:8:19 | L | A$L | final, private |

View File

@@ -134,3 +134,23 @@ class C1 {
}
}
}
class Cl0<U0> {
fun <U1> func1() {
fun <U2> func2() {
class Cl1<U3>{
fun fn() {
val x = Cl1<U3>()
}
}
}
}
}
class Cl00<U0> {
class Cl01<U1>{
fun fn() {
val x = Cl01<U1>()
}
}
}

View File

@@ -34,8 +34,20 @@ superCall
| classes.kt:119:13:121:13 | super(...) |
| classes.kt:127:16:134:9 | super(...) |
| classes.kt:129:17:131:17 | super(...) |
| classes.kt:138:1:148:1 | super(...) |
| classes.kt:140:9:146:9 | super(...) |
| classes.kt:141:13:145:13 | super(...) |
| classes.kt:150:1:156:1 | super(...) |
| classes.kt:151:5:155:5 | super(...) |
| generic_anonymous.kt:1:1:9:1 | super(...) |
| generic_anonymous.kt:3:19:5:3 | super(...) |
| generic_anonymous.kt:15:1:33:1 | super(...) |
| generic_anonymous.kt:25:9:31:9 | super(...) |
| generic_anonymous.kt:26:13:26:37 | super(...) |
| generic_anonymous.kt:27:13:27:37 | super(...) |
| generic_anonymous.kt:28:13:28:41 | super(...) |
| generic_anonymous.kt:29:13:29:29 | super(...) |
| generic_anonymous.kt:30:13:30:33 | super(...) |
| localClassField.kt:1:1:11:1 | super(...) |
| localClassField.kt:3:9:3:19 | super(...) |
| localClassField.kt:8:9:8:19 | super(...) |

View File

@@ -0,0 +1,5 @@
| file://:0:0:0:0 | Unexpected specialised instance of generic anonymous class | CodeQL Kotlin extractor | 5 | | Unexpected specialised instance of generic anonymous class | 2022-09-09 11:08:33 Unexpected specialised instance of generic anonymous class ...while extracting a expression (<no name>) at generic_anonymous.kt:26:13:26:37\n ...while extracting a type operator call (<no name>) at generic_anonymous.kt:26:13:26:37\n ...while extracting a expression (<no name>) at generic_anonymous.kt:26:13:26:37\n ...while extracting a statement (<no name>) at generic_anonymous.kt:26:13:26:37\n ...while extracting a block body (<no name>) at generic_anonymous.kt:25:26:31:9\n ...while extracting a body (<no name>) at generic_anonymous.kt:25:26:31:9\n ...while extracting a function (func2) at generic_anonymous.kt:25:9:31:9\n ...while extracting a generated class (func2) at generic_anonymous.kt:25:9:31:9\n ...while extracting a statement (func2) at generic_anonymous.kt:25:9:31:9\n ...while extracting a block body (<no name>) at generic_anonymous.kt:24:22:32:5\n ...while extracting a body (<no name>) at generic_anonymous.kt:24:22:32:5\n ...while extracting a function (func1) at generic_anonymous.kt:24:5:32:5\n ...while extracting a declaration (func1) at generic_anonymous.kt:24:5:32:5\n ...while extracting a class source (Outer) at generic_anonymous.kt:15:1:33:1\n ...while extracting a declaration (Outer) at generic_anonymous.kt:15:1:33:1\n ...while extracting a file (generic_anonymous.kt) at generic_anonymous.kt:1:1:34:0\n |
| file://:0:0:0:0 | Unexpected specialised instance of generic anonymous class | CodeQL Kotlin extractor | 5 | | Unexpected specialised instance of generic anonymous class | 2022-09-09 11:08:33 Unexpected specialised instance of generic anonymous class ...while extracting a expression (<no name>) at generic_anonymous.kt:27:13:27:37\n ...while extracting a type operator call (<no name>) at generic_anonymous.kt:27:13:27:37\n ...while extracting a expression (<no name>) at generic_anonymous.kt:27:13:27:37\n ...while extracting a statement (<no name>) at generic_anonymous.kt:27:13:27:37\n ...while extracting a block body (<no name>) at generic_anonymous.kt:25:26:31:9\n ...while extracting a body (<no name>) at generic_anonymous.kt:25:26:31:9\n ...while extracting a function (func2) at generic_anonymous.kt:25:9:31:9\n ...while extracting a generated class (func2) at generic_anonymous.kt:25:9:31:9\n ...while extracting a statement (func2) at generic_anonymous.kt:25:9:31:9\n ...while extracting a block body (<no name>) at generic_anonymous.kt:24:22:32:5\n ...while extracting a body (<no name>) at generic_anonymous.kt:24:22:32:5\n ...while extracting a function (func1) at generic_anonymous.kt:24:5:32:5\n ...while extracting a declaration (func1) at generic_anonymous.kt:24:5:32:5\n ...while extracting a class source (Outer) at generic_anonymous.kt:15:1:33:1\n ...while extracting a declaration (Outer) at generic_anonymous.kt:15:1:33:1\n ...while extracting a file (generic_anonymous.kt) at generic_anonymous.kt:1:1:34:0\n |
| file://:0:0:0:0 | Unexpected specialised instance of generic anonymous class | CodeQL Kotlin extractor | 5 | | Unexpected specialised instance of generic anonymous class | 2022-09-09 11:08:33 Unexpected specialised instance of generic anonymous class ...while extracting a expression (<no name>) at generic_anonymous.kt:28:13:28:41\n ...while extracting a type operator call (<no name>) at generic_anonymous.kt:28:13:28:41\n ...while extracting a expression (<no name>) at generic_anonymous.kt:28:13:28:41\n ...while extracting a statement (<no name>) at generic_anonymous.kt:28:13:28:41\n ...while extracting a block body (<no name>) at generic_anonymous.kt:25:26:31:9\n ...while extracting a body (<no name>) at generic_anonymous.kt:25:26:31:9\n ...while extracting a function (func2) at generic_anonymous.kt:25:9:31:9\n ...while extracting a generated class (func2) at generic_anonymous.kt:25:9:31:9\n ...while extracting a statement (func2) at generic_anonymous.kt:25:9:31:9\n ...while extracting a block body (<no name>) at generic_anonymous.kt:24:22:32:5\n ...while extracting a body (<no name>) at generic_anonymous.kt:24:22:32:5\n ...while extracting a function (func1) at generic_anonymous.kt:24:5:32:5\n ...while extracting a declaration (func1) at generic_anonymous.kt:24:5:32:5\n ...while extracting a class source (Outer) at generic_anonymous.kt:15:1:33:1\n ...while extracting a declaration (Outer) at generic_anonymous.kt:15:1:33:1\n ...while extracting a file (generic_anonymous.kt) at generic_anonymous.kt:1:1:34:0\n |
| file://:0:0:0:0 | Unexpected specialised instance of generic anonymous class | CodeQL Kotlin extractor | 5 | | Unexpected specialised instance of generic anonymous class | 2022-09-09 11:08:33 Unexpected specialised instance of generic anonymous class ...while extracting a expression (<no name>) at generic_anonymous.kt:29:13:29:29\n ...while extracting a type operator call (<no name>) at generic_anonymous.kt:29:13:29:29\n ...while extracting a expression (<no name>) at generic_anonymous.kt:29:13:29:29\n ...while extracting a statement (<no name>) at generic_anonymous.kt:29:13:29:29\n ...while extracting a block body (<no name>) at generic_anonymous.kt:25:26:31:9\n ...while extracting a body (<no name>) at generic_anonymous.kt:25:26:31:9\n ...while extracting a function (func2) at generic_anonymous.kt:25:9:31:9\n ...while extracting a generated class (func2) at generic_anonymous.kt:25:9:31:9\n ...while extracting a statement (func2) at generic_anonymous.kt:25:9:31:9\n ...while extracting a block body (<no name>) at generic_anonymous.kt:24:22:32:5\n ...while extracting a body (<no name>) at generic_anonymous.kt:24:22:32:5\n ...while extracting a function (func1) at generic_anonymous.kt:24:5:32:5\n ...while extracting a declaration (func1) at generic_anonymous.kt:24:5:32:5\n ...while extracting a class source (Outer) at generic_anonymous.kt:15:1:33:1\n ...while extracting a declaration (Outer) at generic_anonymous.kt:15:1:33:1\n ...while extracting a file (generic_anonymous.kt) at generic_anonymous.kt:1:1:34:0\n |
| file://:0:0:0:0 | Unexpected specialised instance of generic anonymous class | CodeQL Kotlin extractor | 5 | | Unexpected specialised instance of generic anonymous class | 2022-09-09 11:08:33 Unexpected specialised instance of generic anonymous class ...while extracting a expression (<no name>) at generic_anonymous.kt:30:13:30:33\n ...while extracting a type operator call (<no name>) at generic_anonymous.kt:30:13:30:33\n ...while extracting a expression (<no name>) at generic_anonymous.kt:30:13:30:33\n ...while extracting a statement (<no name>) at generic_anonymous.kt:30:13:30:33\n ...while extracting a block body (<no name>) at generic_anonymous.kt:25:26:31:9\n ...while extracting a body (<no name>) at generic_anonymous.kt:25:26:31:9\n ...while extracting a function (func2) at generic_anonymous.kt:25:9:31:9\n ...while extracting a generated class (func2) at generic_anonymous.kt:25:9:31:9\n ...while extracting a statement (func2) at generic_anonymous.kt:25:9:31:9\n ...while extracting a block body (<no name>) at generic_anonymous.kt:24:22:32:5\n ...while extracting a body (<no name>) at generic_anonymous.kt:24:22:32:5\n ...while extracting a function (func1) at generic_anonymous.kt:24:5:32:5\n ...while extracting a declaration (func1) at generic_anonymous.kt:24:5:32:5\n ...while extracting a class source (Outer) at generic_anonymous.kt:15:1:33:1\n ...while extracting a declaration (Outer) at generic_anonymous.kt:15:1:33:1\n ...while extracting a file (generic_anonymous.kt) at generic_anonymous.kt:1:1:34:0\n |

View File

@@ -44,3 +44,34 @@
| generic_anonymous.kt:13:27:13:41 | new Generic<Integer>(...) | Generic<Integer> |
| generic_anonymous.kt:13:40:13:40 | i | int |
| generic_anonymous.kt:13:43:13:47 | get(...) | int |
| generic_anonymous.kt:17:9:17:29 | T0 | T0 |
| generic_anonymous.kt:17:26:17:29 | null | Void |
| generic_anonymous.kt:21:9:21:29 | T1 | T1 |
| generic_anonymous.kt:21:26:21:29 | null | Void |
| generic_anonymous.kt:24:5:32:5 | Unit | Unit |
| generic_anonymous.kt:25:9:31:9 | Unit | Unit |
| generic_anonymous.kt:26:13:26:37 | <Stmt> | new Object(...) { ... } |
| generic_anonymous.kt:26:13:26:37 | <implicit coercion to unit> | Unit |
| generic_anonymous.kt:26:13:26:37 | Object | Object |
| generic_anonymous.kt:26:13:26:37 | Unit | Unit |
| generic_anonymous.kt:26:13:26:37 | new (...) | new Object(...) { ... } |
| generic_anonymous.kt:27:13:27:37 | <Stmt> | new Object(...) { ... } |
| generic_anonymous.kt:27:13:27:37 | <implicit coercion to unit> | Unit |
| generic_anonymous.kt:27:13:27:37 | Object | Object |
| generic_anonymous.kt:27:13:27:37 | Unit | Unit |
| generic_anonymous.kt:27:13:27:37 | new (...) | new Object(...) { ... } |
| generic_anonymous.kt:28:13:28:41 | <Stmt> | new Object(...) { ... } |
| generic_anonymous.kt:28:13:28:41 | <implicit coercion to unit> | Unit |
| generic_anonymous.kt:28:13:28:41 | Object | Object |
| generic_anonymous.kt:28:13:28:41 | Unit | Unit |
| generic_anonymous.kt:28:13:28:41 | new (...) | new Object(...) { ... } |
| generic_anonymous.kt:29:13:29:29 | <Stmt> | new C0<U2>(...) { ... } |
| generic_anonymous.kt:29:13:29:29 | <implicit coercion to unit> | Unit |
| generic_anonymous.kt:29:13:29:29 | C0<U2> | C0<U2> |
| generic_anonymous.kt:29:13:29:29 | Unit | Unit |
| generic_anonymous.kt:29:13:29:29 | new (...) | new C0<U2>(...) { ... } |
| generic_anonymous.kt:30:13:30:33 | <Stmt> | new C0<String>(...) { ... } |
| generic_anonymous.kt:30:13:30:33 | <implicit coercion to unit> | Unit |
| generic_anonymous.kt:30:13:30:33 | C0<String> | C0<String> |
| generic_anonymous.kt:30:13:30:33 | Unit | Unit |
| generic_anonymous.kt:30:13:30:33 | new (...) | new C0<String>(...) { ... } |

View File

@@ -11,3 +11,23 @@ private class Generic<T>(val t: T) {
fun stringIdentity(s: String) = Generic<String>(s).get()
fun intIdentity(i: Int) = Generic<Int>(i).get()
class Outer<T0> {
open interface C0<T0> {
fun fn0(): T0? = null
}
open interface C1<T1> {
fun fn1(): T1? = null
}
fun <U2> func1() {
fun <U3> func2() {
object: C0<U2>, C1<U3> {}
object: C0<U2>, C1<U2> {}
object: C0<U2>, C1<String> {}
object: C0<U2> {}
object: C0<String> {}
}
}
}

View File

@@ -3,4 +3,6 @@
| classes.kt:59:1:59:23 | Interface1 |
| classes.kt:60:1:60:23 | Interface2 |
| classes.kt:61:1:61:26 | Interface3 |
| generic_anonymous.kt:16:5:18:5 | C0 |
| generic_anonymous.kt:20:5:22:5 | C1 |
| local_anonymous.kt:38:1:38:23 | Interface2 |

View File

@@ -2,6 +2,9 @@
| classes.kt:118:9:123:9 | class ... | classes.kt:118:9:123:9 | | classes.kt:117:5:124:5 | fn2 | classes.kt:109:1:136:1 | C1 |
| classes.kt:119:13:121:13 | class ... | classes.kt:119:13:121:13 | Local2 | classes.kt:118:9:123:9 | localFn | classes.kt:109:1:136:1 | C1 |
| classes.kt:129:17:131:17 | class ... | classes.kt:129:17:131:17 | Local3 | classes.kt:128:13:133:13 | fn | classes.kt:127:16:134:9 | new Object(...) { ... } |
| classes.kt:140:9:146:9 | class ... | classes.kt:140:9:146:9 | | classes.kt:139:5:147:5 | func1 | classes.kt:138:1:148:1 | Cl0 |
| classes.kt:141:13:145:13 | class ... | classes.kt:141:13:145:13 | Cl1 | classes.kt:140:9:146:9 | func2 | classes.kt:138:1:148:1 | Cl0 |
| generic_anonymous.kt:25:9:31:9 | class ... | generic_anonymous.kt:25:9:31:9 | | generic_anonymous.kt:24:5:32:5 | func1 | generic_anonymous.kt:15:1:33:1 | Outer |
| localClassField.kt:3:9:3:19 | class ... | localClassField.kt:3:9:3:19 | L | localClassField.kt:1:1:11:1 | A | localClassField.kt:1:1:11:1 | A |
| localClassField.kt:8:9:8:19 | class ... | localClassField.kt:8:9:8:19 | L | localClassField.kt:1:1:11:1 | A | localClassField.kt:1:1:11:1 | A |
| local_anonymous.kt:11:9:11:24 | class ... | local_anonymous.kt:11:9:11:24 | | local_anonymous.kt:10:5:13:5 | fn2 | local_anonymous.kt:3:1:36:1 | Class1 |

View File

@@ -1,9 +1,15 @@
| classes.kt:111:9:113:9 | Local1 | 0 | classes.kt:111:22:111:23 | T1 |
| classes.kt:119:13:121:13 | Local2 | 0 | classes.kt:119:26:119:27 | T1 |
| classes.kt:129:17:131:17 | Local3 | 0 | classes.kt:129:30:129:31 | T1 |
| classes.kt:138:1:148:1 | Cl0 | 0 | classes.kt:138:11:138:12 | U0 |
| classes.kt:141:13:145:13 | Cl1 | 0 | classes.kt:141:23:141:24 | U3 |
| classes.kt:150:1:156:1 | Cl00 | 0 | classes.kt:150:12:150:13 | U0 |
| classes.kt:151:5:155:5 | Cl01 | 0 | classes.kt:151:16:151:17 | U1 |
| file://<external>/C1$<no name provided>$Local3.class:0:0:0:0 | Local3<Integer> | 0 | file://<external>/Integer.class:0:0:0:0 | Integer |
| file://<external>/C1$Local1.class:0:0:0:0 | Local1<Integer> | 0 | file://<external>/Integer.class:0:0:0:0 | Integer |
| file://<external>/C1$Local2.class:0:0:0:0 | Local2<Integer> | 0 | file://<external>/Integer.class:0:0:0:0 | Integer |
| file://<external>/Cl0$Cl1.class:0:0:0:0 | Cl1<U3> | 0 | classes.kt:141:23:141:24 | U3 |
| file://<external>/Cl0.class:0:0:0:0 | Cl0<U0> | 0 | classes.kt:140:14:140:15 | U2 |
| file://<external>/Generic.class:0:0:0:0 | Generic<Integer> | 0 | file://<external>/Integer.class:0:0:0:0 | Integer |
| file://<external>/Generic.class:0:0:0:0 | Generic<String> | 0 | file://<external>/String.class:0:0:0:0 | String |
| file://<external>/SuperChain1.class:0:0:0:0 | SuperChain1<T3,String> | 0 | superChain.kt:2:24:2:25 | T3 |
@@ -13,6 +19,7 @@
| file://<external>/SuperChain2.class:0:0:0:0 | SuperChain2<T5,String> | 0 | superChain.kt:3:24:3:25 | T5 |
| file://<external>/SuperChain2.class:0:0:0:0 | SuperChain2<T5,String> | 1 | file://<external>/String.class:0:0:0:0 | String |
| generic_anonymous.kt:1:1:9:1 | Generic | 0 | generic_anonymous.kt:1:23:1:23 | T |
| generic_anonymous.kt:15:1:33:1 | Outer | 0 | generic_anonymous.kt:15:13:15:14 | T0 |
| superChain.kt:1:1:1:33 | SuperChain1 | 0 | superChain.kt:1:24:1:25 | T1 |
| superChain.kt:1:1:1:33 | SuperChain1 | 1 | superChain.kt:1:28:1:29 | T2 |
| superChain.kt:2:1:2:60 | SuperChain2 | 0 | superChain.kt:2:24:2:25 | T3 |

View File

@@ -39,9 +39,16 @@
| classes.kt:119:13:121:13 | Local2 | file://<external>/Object.class:0:0:0:0 | Object |
| classes.kt:127:16:134:9 | new Object(...) { ... } | file://<external>/Object.class:0:0:0:0 | Object |
| classes.kt:129:17:131:17 | Local3 | file://<external>/Object.class:0:0:0:0 | Object |
| classes.kt:138:1:148:1 | Cl0 | file://<external>/Object.class:0:0:0:0 | Object |
| classes.kt:140:9:146:9 | | file://<external>/Object.class:0:0:0:0 | Object |
| classes.kt:141:13:145:13 | Cl1 | file://<external>/Object.class:0:0:0:0 | Object |
| classes.kt:150:1:156:1 | Cl00 | file://<external>/Object.class:0:0:0:0 | Object |
| classes.kt:151:5:155:5 | Cl01 | file://<external>/Object.class:0:0:0:0 | Object |
| file://<external>/C1$<no name provided>$Local3.class:0:0:0:0 | Local3<Integer> | file://<external>/Object.class:0:0:0:0 | Object |
| file://<external>/C1$Local1.class:0:0:0:0 | Local1<Integer> | file://<external>/Object.class:0:0:0:0 | Object |
| file://<external>/C1$Local2.class:0:0:0:0 | Local2<Integer> | file://<external>/Object.class:0:0:0:0 | Object |
| file://<external>/Cl0$Cl1.class:0:0:0:0 | Cl1<U3> | file://<external>/Object.class:0:0:0:0 | Object |
| file://<external>/Cl0.class:0:0:0:0 | Cl0<U0> | file://<external>/Object.class:0:0:0:0 | Object |
| file://<external>/Generic.class:0:0:0:0 | Generic<Integer> | file://<external>/Object.class:0:0:0:0 | Object |
| file://<external>/Generic.class:0:0:0:0 | Generic<String> | file://<external>/Object.class:0:0:0:0 | Object |
| file://<external>/SuperChain1.class:0:0:0:0 | SuperChain1<T3,String> | file://<external>/Object.class:0:0:0:0 | Object |
@@ -49,6 +56,16 @@
| file://<external>/SuperChain2.class:0:0:0:0 | SuperChain2<T5,String> | file://<external>/SuperChain1.class:0:0:0:0 | SuperChain1<T5,String> |
| generic_anonymous.kt:1:1:9:1 | Generic | file://<external>/Object.class:0:0:0:0 | Object |
| generic_anonymous.kt:3:19:5:3 | new Object(...) { ... } | file://<external>/Object.class:0:0:0:0 | Object |
| generic_anonymous.kt:15:1:33:1 | Outer | file://<external>/Object.class:0:0:0:0 | Object |
| generic_anonymous.kt:25:9:31:9 | | file://<external>/Object.class:0:0:0:0 | Object |
| generic_anonymous.kt:26:13:26:37 | new Object(...) { ... } | file://<external>/Outer$C0.class:0:0:0:0 | C0<U2> |
| generic_anonymous.kt:26:13:26:37 | new Object(...) { ... } | file://<external>/Outer$C1.class:0:0:0:0 | C1<U3> |
| generic_anonymous.kt:27:13:27:37 | new Object(...) { ... } | file://<external>/Outer$C0.class:0:0:0:0 | C0<U2> |
| generic_anonymous.kt:27:13:27:37 | new Object(...) { ... } | file://<external>/Outer$C1.class:0:0:0:0 | C1<U2> |
| generic_anonymous.kt:28:13:28:41 | new Object(...) { ... } | file://<external>/Outer$C0.class:0:0:0:0 | C0<U2> |
| generic_anonymous.kt:28:13:28:41 | new Object(...) { ... } | file://<external>/Outer$C1.class:0:0:0:0 | C1<String> |
| generic_anonymous.kt:29:13:29:29 | new C0<U2>(...) { ... } | file://<external>/Outer$C0.class:0:0:0:0 | C0<U2> |
| generic_anonymous.kt:30:13:30:33 | new C0<String>(...) { ... } | file://<external>/Outer$C0.class:0:0:0:0 | C0<String> |
| localClassField.kt:1:1:11:1 | A | file://<external>/Object.class:0:0:0:0 | Object |
| localClassField.kt:3:9:3:19 | L | file://<external>/Object.class:0:0:0:0 | Object |
| localClassField.kt:8:9:8:19 | L | file://<external>/Object.class:0:0:0:0 | Object |