FIR checker: reproduce KT-43156
This commit is contained in:
committed by
teamcityserver
parent
f4347a60c2
commit
7b06885348
+5
@@ -39,6 +39,11 @@ public class FirOldFrontendDiagnosticsTestWithStdlibGenerated extends AbstractFi
|
|||||||
runTest("compiler/testData/diagnostics/testsWithStdLib/ArrayOfNothing.kt");
|
runTest("compiler/testData/diagnostics/testsWithStdLib/ArrayOfNothing.kt");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@TestMetadata("assignedInSynchronized.kt")
|
||||||
|
public void testAssignedInSynchronized() throws Exception {
|
||||||
|
runTest("compiler/testData/diagnostics/testsWithStdLib/assignedInSynchronized.kt");
|
||||||
|
}
|
||||||
|
|
||||||
@TestMetadata("CallCompanionProtectedNonStatic.kt")
|
@TestMetadata("CallCompanionProtectedNonStatic.kt")
|
||||||
public void testCallCompanionProtectedNonStatic() throws Exception {
|
public void testCallCompanionProtectedNonStatic() throws Exception {
|
||||||
runTest("compiler/testData/diagnostics/testsWithStdLib/CallCompanionProtectedNonStatic.kt");
|
runTest("compiler/testData/diagnostics/testsWithStdLib/CallCompanionProtectedNonStatic.kt");
|
||||||
|
|||||||
@@ -0,0 +1,12 @@
|
|||||||
|
class A {
|
||||||
|
fun test() {
|
||||||
|
val a: A
|
||||||
|
synchronized(this) {
|
||||||
|
if (bar()) throw RuntimeException()
|
||||||
|
a = A()
|
||||||
|
}
|
||||||
|
<!UNINITIALIZED_VARIABLE!>a<!>.bar()
|
||||||
|
}
|
||||||
|
|
||||||
|
fun bar() = false
|
||||||
|
}
|
||||||
@@ -0,0 +1,12 @@
|
|||||||
|
class A {
|
||||||
|
fun test() {
|
||||||
|
val a: A
|
||||||
|
synchronized(this) {
|
||||||
|
if (bar()) throw RuntimeException()
|
||||||
|
a = A()
|
||||||
|
}
|
||||||
|
a.bar()
|
||||||
|
}
|
||||||
|
|
||||||
|
fun bar() = false
|
||||||
|
}
|
||||||
@@ -0,0 +1,10 @@
|
|||||||
|
package
|
||||||
|
|
||||||
|
public final class A {
|
||||||
|
public constructor A()
|
||||||
|
public final fun bar(): kotlin.Boolean
|
||||||
|
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 final fun test(): kotlin.Unit
|
||||||
|
public open override /*1*/ /*fake_override*/ fun toString(): kotlin.String
|
||||||
|
}
|
||||||
+12
@@ -90,3 +90,15 @@ class DefiniteInitializationInInitSection {
|
|||||||
unknownRun { y = 239 }
|
unknownRun { y = 239 }
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
class DefiniteInitializationAfterThrow {
|
||||||
|
fun test() {
|
||||||
|
val a: Int
|
||||||
|
myRun {
|
||||||
|
if (bar()) throw RuntimeException()
|
||||||
|
a = 42
|
||||||
|
}
|
||||||
|
<!UNINITIALIZED_VARIABLE!>a<!>.hashCode()
|
||||||
|
}
|
||||||
|
fun bar() = false
|
||||||
|
}
|
||||||
|
|||||||
+12
@@ -90,3 +90,15 @@ class DefiniteInitializationInInitSection {
|
|||||||
unknownRun { <!CAPTURED_MEMBER_VAL_INITIALIZATION!>y<!> = 239 }
|
unknownRun { <!CAPTURED_MEMBER_VAL_INITIALIZATION!>y<!> = 239 }
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
class DefiniteInitializationAfterThrow {
|
||||||
|
fun test() {
|
||||||
|
val a: Int
|
||||||
|
myRun {
|
||||||
|
if (bar()) throw RuntimeException()
|
||||||
|
a = 42
|
||||||
|
}
|
||||||
|
a.hashCode()
|
||||||
|
}
|
||||||
|
fun bar() = false
|
||||||
|
}
|
||||||
|
|||||||
+9
@@ -11,6 +11,15 @@ public fun returningValue(): kotlin.Unit
|
|||||||
public fun shadowing(): kotlin.Unit
|
public fun shadowing(): kotlin.Unit
|
||||||
public fun unknownRun(/*0*/ block: () -> kotlin.Unit): kotlin.Unit
|
public fun unknownRun(/*0*/ block: () -> kotlin.Unit): kotlin.Unit
|
||||||
|
|
||||||
|
public final class DefiniteInitializationAfterThrow {
|
||||||
|
public constructor DefiniteInitializationAfterThrow()
|
||||||
|
public final fun bar(): kotlin.Boolean
|
||||||
|
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 final fun test(): kotlin.Unit
|
||||||
|
public open override /*1*/ /*fake_override*/ fun toString(): kotlin.String
|
||||||
|
}
|
||||||
|
|
||||||
public final class DefiniteInitializationInInitSection {
|
public final class DefiniteInitializationInInitSection {
|
||||||
public constructor DefiniteInitializationInInitSection()
|
public constructor DefiniteInitializationInInitSection()
|
||||||
public final val x: kotlin.Int
|
public final val x: kotlin.Int
|
||||||
|
|||||||
+5
@@ -39,6 +39,11 @@ public class DiagnosticsTestWithStdLibGenerated extends AbstractDiagnosticsTestW
|
|||||||
runTest("compiler/testData/diagnostics/testsWithStdLib/ArrayOfNothing.kt");
|
runTest("compiler/testData/diagnostics/testsWithStdLib/ArrayOfNothing.kt");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@TestMetadata("assignedInSynchronized.kt")
|
||||||
|
public void testAssignedInSynchronized() throws Exception {
|
||||||
|
runTest("compiler/testData/diagnostics/testsWithStdLib/assignedInSynchronized.kt");
|
||||||
|
}
|
||||||
|
|
||||||
@TestMetadata("CallCompanionProtectedNonStatic.kt")
|
@TestMetadata("CallCompanionProtectedNonStatic.kt")
|
||||||
public void testCallCompanionProtectedNonStatic() throws Exception {
|
public void testCallCompanionProtectedNonStatic() throws Exception {
|
||||||
runTest("compiler/testData/diagnostics/testsWithStdLib/CallCompanionProtectedNonStatic.kt");
|
runTest("compiler/testData/diagnostics/testsWithStdLib/CallCompanionProtectedNonStatic.kt");
|
||||||
|
|||||||
compiler/tests/org/jetbrains/kotlin/checkers/javac/DiagnosticsTestWithStdLibUsingJavacGenerated.java
Generated
+5
@@ -39,6 +39,11 @@ public class DiagnosticsTestWithStdLibUsingJavacGenerated extends AbstractDiagno
|
|||||||
runTest("compiler/testData/diagnostics/testsWithStdLib/ArrayOfNothing.kt");
|
runTest("compiler/testData/diagnostics/testsWithStdLib/ArrayOfNothing.kt");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@TestMetadata("assignedInSynchronized.kt")
|
||||||
|
public void testAssignedInSynchronized() throws Exception {
|
||||||
|
runTest("compiler/testData/diagnostics/testsWithStdLib/assignedInSynchronized.kt");
|
||||||
|
}
|
||||||
|
|
||||||
@TestMetadata("CallCompanionProtectedNonStatic.kt")
|
@TestMetadata("CallCompanionProtectedNonStatic.kt")
|
||||||
public void testCallCompanionProtectedNonStatic() throws Exception {
|
public void testCallCompanionProtectedNonStatic() throws Exception {
|
||||||
runTest("compiler/testData/diagnostics/testsWithStdLib/CallCompanionProtectedNonStatic.kt");
|
runTest("compiler/testData/diagnostics/testsWithStdLib/CallCompanionProtectedNonStatic.kt");
|
||||||
|
|||||||
Reference in New Issue
Block a user