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:
@@ -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()
|
||||
}
|
||||
Reference in New Issue
Block a user