KT-3573 "Error generating primary constructor" when trying to use "this" in extensions from constructors

#KT-3573 Fixed
This commit is contained in:
Mikhael Bogdanov
2013-09-17 15:38:46 +04:00
parent fe7b5cc532
commit 8ffee527d7
4 changed files with 47 additions and 1 deletions
@@ -0,0 +1,12 @@
class Data
fun newInit(f: Data.() -> Data) = Data().f()
class TestClass {
val test: Data = newInit() { this }
}
fun box() : String {
TestClass()
return "OK"
}