Fix for KT-11833: Error generating constructors of class null with kind IMPLEMENTATION on anonymous object inheriting from nested class of super class

#KT-11833 Fixed
This commit is contained in:
Michael Bogdanov
2016-07-21 10:18:10 +03:00
parent 6556cde329
commit 5dca4dbc67
5 changed files with 63 additions and 0 deletions
@@ -0,0 +1,17 @@
abstract class Father {
abstract inner class InClass {
abstract fun work(): String
}
}
class Child : Father() {
val ChildInClass = object : Father.InClass() {
override fun work(): String {
return "OK"
}
}
}
fun box(): String {
return Child().ChildInClass.work()
}
@@ -0,0 +1,19 @@
abstract class Father {
abstract inner class InClass {
abstract fun work(): String
}
}
class Child : Father() {
fun test(): InClass {
return object : Father.InClass() {
override fun work(): String {
return "OK"
}
}
}
}
fun box(): String {
return Child().test().work()
}