JVM_IR: Prevent writing output after an error is reported

#KT-53825 Fixed
This commit is contained in:
Xin Wang
2022-10-18 15:36:46 +08:00
committed by Alexander Udalov
parent 252e97663b
commit 7b3ce35613
12 changed files with 43 additions and 12 deletions
@@ -1,4 +1,3 @@
$TESTDATA_DIR$/conflictingJvmDeclarations.kt
-Xuse-k2
-d
$TEMP_DIR$
+3 -6
View File
@@ -1,12 +1,9 @@
warning: ATTENTION!
This build uses experimental K2 compiler:
-Xuse-k2
compiler/testData/cli/jvm/conflictingJvmDeclarations.kt:2:5: error: platform declaration clash: The following declarations have the same JVM signature (getX()I):
compiler/testData/cli/jvm/conflictingJvmDeclarations.kt:3:9: error: platform declaration clash: The following declarations have the same JVM signature (getX()I):
fun `<get-x>`(): Int defined in Foo
fun getX(): Int defined in Foo
fun getY(): Int defined in Foo
val x: Int
^
get() = 42
^
compiler/testData/cli/jvm/conflictingJvmDeclarations.kt:8:5: error: platform declaration clash: The following declarations have the same JVM signature (getX()I):
fun `<get-x>`(): Int defined in Foo
fun getX(): Int defined in Foo
@@ -0,0 +1,2 @@
// ABSENT: Foo.class
// ABSENT: META-INF/main.kotlin_module
@@ -0,0 +1,4 @@
$TESTDATA_DIR$/conflictingJvmDeclarations.kt
-Xuse-k2
-d
$TEMP_DIR$
@@ -0,0 +1,16 @@
warning: ATTENTION!
This build uses experimental K2 compiler:
-Xuse-k2
compiler/testData/cli/jvm/conflictingJvmDeclarations.kt:2:5: error: platform declaration clash: The following declarations have the same JVM signature (getX()I):
fun `<get-x>`(): Int defined in Foo
fun getX(): Int defined in Foo
fun getY(): Int defined in Foo
val x: Int
^
compiler/testData/cli/jvm/conflictingJvmDeclarations.kt:8:5: error: platform declaration clash: The following declarations have the same JVM signature (getX()I):
fun `<get-x>`(): Int defined in Foo
fun getX(): Int defined in Foo
fun getY(): Int defined in Foo
@JvmName("getX")
^
COMPILATION_ERROR
@@ -0,0 +1,2 @@
// ABSENT: Foo.class
// ABSENT: META-INF/main.kotlin_module