K2 JVM: Take JVM declarations conflicting error back
Since SimpleDiagnosticsCollectorWithSuppress have been replaced by
PendingDiagnosticsCollectorWithSuppress after commit 9add6f3d55,
diagnostics need to be committed now.
#KT-54366 Fixed
This commit is contained in:
@@ -0,0 +1,4 @@
|
||||
$TESTDATA_DIR$/conflictingJvmDeclarations.kt
|
||||
-Xuse-k2
|
||||
-d
|
||||
$TEMP_DIR$
|
||||
@@ -0,0 +1,9 @@
|
||||
class Foo {
|
||||
val x: Int
|
||||
get() = 42
|
||||
|
||||
fun getX() = 42
|
||||
|
||||
@JvmName("getX")
|
||||
fun getY() = 42
|
||||
}
|
||||
@@ -0,0 +1,22 @@
|
||||
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:5: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
|
||||
fun getX() = 42
|
||||
^
|
||||
compiler/testData/cli/jvm/conflictingJvmDeclarations.kt:7: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
|
||||
Reference in New Issue
Block a user