KT-4173: Can't pass a non-trivial closure to a super-call for object expression
#KT-4173 Fixed
This commit is contained in:
@@ -0,0 +1,27 @@
|
||||
open class C(s: Int) {
|
||||
fun test() {
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
class B(var x: Int) {
|
||||
fun foo() {
|
||||
class A(val a: Int) : C({a}()) {
|
||||
|
||||
}
|
||||
A(11).test()
|
||||
|
||||
|
||||
class B(val a: Int) : C(a) {
|
||||
}
|
||||
|
||||
B(11).test()
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
fun box() : String {
|
||||
val b = B(1)
|
||||
b.foo()
|
||||
return "OK"
|
||||
}
|
||||
Reference in New Issue
Block a user