Tests for KT-3646: Wrong this in closure for extension function in constructor

#KT-3646 Obsolete
This commit is contained in:
Mikhael Bogdanov
2013-11-28 12:08:36 +04:00
parent 9ae4af2e4b
commit 1f37ebf7e7
2 changed files with 16 additions and 0 deletions
@@ -0,0 +1,11 @@
fun test(cl: Int.() -> Int):Int = 11.cl()
class Foo {
val a = test { this }
}
fun box(): String {
if (Foo().a != 11) return "fail"
return "OK"
}