Add test for KT-17479 looks like #KT-17479 Fixed

(after CAPTURED_MEMBER_VAL_INITIALIZATION introduction)
This commit is contained in:
Mikhail Glukhikh
2017-04-28 13:21:34 +03:00
committed by Mikhail Glukhikh
parent 28283bad3e
commit b5d0de7c3f
3 changed files with 32 additions and 0 deletions
@@ -0,0 +1,17 @@
// See KT-17479
class Test {
val str: String
init {
run {
<!CAPTURED_MEMBER_VAL_INITIALIZATION!>this@Test.str<!> = "A"
}
run {
// Not sure do we need diagnostic also here
this@Test.str = "B"
}
str = "C"
}
}
@@ -0,0 +1,9 @@
package
public final class Test {
public constructor Test()
public final val str: kotlin.String
public open override /*1*/ /*fake_override*/ fun equals(/*0*/ other: kotlin.Any?): kotlin.Boolean
public open override /*1*/ /*fake_override*/ fun hashCode(): kotlin.Int
public open override /*1*/ /*fake_override*/ fun toString(): kotlin.String
}