Add test for KT-17479 looks like #KT-17479 Fixed
(after CAPTURED_MEMBER_VAL_INITIALIZATION introduction)
This commit is contained in:
committed by
Mikhail Glukhikh
parent
28283bad3e
commit
b5d0de7c3f
Vendored
+17
@@ -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"
|
||||
}
|
||||
}
|
||||
Vendored
+9
@@ -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
|
||||
}
|
||||
@@ -3790,6 +3790,12 @@ public class DiagnosticsTestGenerated extends AbstractDiagnosticsTest {
|
||||
doTest(fileName);
|
||||
}
|
||||
|
||||
@TestMetadata("initializationInLocalViaExplicitThis.kt")
|
||||
public void testInitializationInLocalViaExplicitThis() throws Exception {
|
||||
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/controlFlowAnalysis/initializationInLocalViaExplicitThis.kt");
|
||||
doTest(fileName);
|
||||
}
|
||||
|
||||
@TestMetadata("kt1001.kt")
|
||||
public void testKt1001() throws Exception {
|
||||
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/controlFlowAnalysis/kt1001.kt");
|
||||
|
||||
Reference in New Issue
Block a user