Additional simple test for variable initialize in secondary constructor

This commit is contained in:
Nikolay Krasko
2016-05-06 18:26:10 +03:00
committed by Nikolay Krasko
parent d02b89a7a0
commit 147f170f80
3 changed files with 21 additions and 0 deletions
@@ -0,0 +1,6 @@
class A {
val x: Int
constructor(x: Int) {
this.x = x
}
}
@@ -0,0 +1,9 @@
package
public final class A {
public constructor A(/*0*/ x: kotlin.Int, /*1*/ y: kotlin.Int)
public final val x: kotlin.Int
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
}
@@ -15960,6 +15960,12 @@ public class DiagnosticsTestGenerated extends AbstractDiagnosticsTest {
doTest(fileName);
}
@TestMetadata("initializeValInConstructor.kt")
public void testInitializeValInConstructor() throws Exception {
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/secondaryConstructors/initializeValInConstructor.kt");
doTest(fileName);
}
@TestMetadata("kt6992.kt")
public void testKt6992() throws Exception {
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/secondaryConstructors/kt6992.kt");