Fix KotlinType building by IrType: don't miss type parameters of outer for inner class

#KT-25405 Fixed
This commit is contained in:
Mikhael Bogdanov
2018-07-11 11:54:23 +02:00
parent 9c6452778f
commit 9cf9cb3ecd
7 changed files with 122 additions and 1 deletions
+31
View File
@@ -0,0 +1,31 @@
// IGNORE_BACKEND: JVM_IR
fun <T> tableView(init: Table<T>.() -> Unit) {
Table<T>().init()
}
var result = "fail"
class Table<T> {
inner class TableColumn(val name: String) {
}
fun column(name: String, init: TableColumn.() -> Unit) {
val column = TableColumn(name).init()
}
}
fun foo() {
tableView<String> {
column("OK") {
result = name
}
}
}
fun box(): String {
foo()
return result
}