提交 7b068853 编写于 作者: J Jinseong Jeon 提交者: teamcityserver

FIR checker: reproduce KT-43156

上级 f4347a60
......@@ -39,6 +39,11 @@ public class FirOldFrontendDiagnosticsTestWithStdlibGenerated extends AbstractFi
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")
public void testCallCompanionProtectedNonStatic() throws Exception {
runTest("compiler/testData/diagnostics/testsWithStdLib/CallCompanionProtectedNonStatic.kt");
......
class A {
fun test() {
val a: A
synchronized(this) {
if (bar()) throw RuntimeException()
a = A()
}
<!UNINITIALIZED_VARIABLE!>a<!>.bar()
}
fun bar() = false
}
class A {
fun test() {
val a: A
synchronized(this) {
if (bar()) throw RuntimeException()
a = A()
}
a.bar()
}
fun bar() = false
}
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
}
......@@ -89,4 +89,16 @@ class DefiniteInitializationInInitSection {
myRun { x = 42 }
unknownRun { y = 239 }
}
}
\ No newline at end of file
}
class DefiniteInitializationAfterThrow {
fun test() {
val a: Int
myRun {
if (bar()) throw RuntimeException()
a = 42
}
<!UNINITIALIZED_VARIABLE!>a<!>.hashCode()
}
fun bar() = false
}
......@@ -89,4 +89,16 @@ class DefiniteInitializationInInitSection {
myRun { <!CAPTURED_VAL_INITIALIZATION!>x<!> = 42 }
unknownRun { <!CAPTURED_MEMBER_VAL_INITIALIZATION!>y<!> = 239 }
}
}
\ No newline at end of file
}
class DefiniteInitializationAfterThrow {
fun test() {
val a: Int
myRun {
if (bar()) throw RuntimeException()
a = 42
}
a.hashCode()
}
fun bar() = false
}
......@@ -11,6 +11,15 @@ public fun returningValue(): kotlin.Unit
public fun shadowing(): 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 constructor DefiniteInitializationInInitSection()
public final val x: kotlin.Int
......
......@@ -39,6 +39,11 @@ public class DiagnosticsTestWithStdLibGenerated extends AbstractDiagnosticsTestW
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")
public void testCallCompanionProtectedNonStatic() throws Exception {
runTest("compiler/testData/diagnostics/testsWithStdLib/CallCompanionProtectedNonStatic.kt");
......
......@@ -39,6 +39,11 @@ public class DiagnosticsTestWithStdLibUsingJavacGenerated extends AbstractDiagno
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")
public void testCallCompanionProtectedNonStatic() throws Exception {
runTest("compiler/testData/diagnostics/testsWithStdLib/CallCompanionProtectedNonStatic.kt");
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册