Added tests with redeclaration. The behavior is correct (compilation error), while diagnostic message is not ideal.
This commit is contained in:
@@ -0,0 +1,13 @@
|
||||
Compiling files:
|
||||
src/class2.kt
|
||||
End of files
|
||||
Cleaning output files:
|
||||
out/production/module/Klass.class
|
||||
End of files
|
||||
Compiling files:
|
||||
src/class1.kt
|
||||
src/class2.kt
|
||||
End of files
|
||||
COMPILATION FAILED
|
||||
Kotlin:ERROR:Redeclaration: Klass
|
||||
Kotlin:ERROR:Redeclaration: Klass
|
||||
@@ -0,0 +1 @@
|
||||
class Klass
|
||||
@@ -0,0 +1 @@
|
||||
class Klass
|
||||
@@ -0,0 +1,11 @@
|
||||
Cleaning output files:
|
||||
out/production/module/test/TestPackage$fun2$*.class
|
||||
out/production/module/test/TestPackage.class
|
||||
End of files
|
||||
Compiling files:
|
||||
src/fun2.kt
|
||||
End of files
|
||||
COMPILATION FAILED
|
||||
Kotlin:ERROR:Platform declaration clash: The following declarations have the same JVM signature (function(Ljava/util/List;)V):
|
||||
fun function(list: kotlin.List<kotlin.Any>): kotlin.Unit
|
||||
fun function(list: kotlin.List<kotlin.String>): kotlin.Unit
|
||||
@@ -0,0 +1,5 @@
|
||||
package test
|
||||
|
||||
fun function(list: List<Any>) {
|
||||
|
||||
}
|
||||
@@ -0,0 +1,3 @@
|
||||
package test
|
||||
|
||||
val x = 1
|
||||
@@ -0,0 +1,7 @@
|
||||
package test
|
||||
|
||||
val x = 1
|
||||
|
||||
fun function(list: List<String>) {
|
||||
|
||||
}
|
||||
@@ -0,0 +1,11 @@
|
||||
Cleaning output files:
|
||||
out/production/module/test/TestPackage$fun2$*.class
|
||||
out/production/module/test/TestPackage.class
|
||||
End of files
|
||||
Compiling files:
|
||||
src/fun2.kt
|
||||
End of files
|
||||
COMPILATION FAILED
|
||||
Kotlin:ERROR:Platform declaration clash: The following declarations have the same JVM signature (function()V):
|
||||
fun function(): kotlin.Unit
|
||||
fun function(): kotlin.Unit
|
||||
@@ -0,0 +1,5 @@
|
||||
package test
|
||||
|
||||
fun function() {
|
||||
|
||||
}
|
||||
@@ -0,0 +1,3 @@
|
||||
package test
|
||||
|
||||
val x = 1
|
||||
@@ -0,0 +1,7 @@
|
||||
package test
|
||||
|
||||
val x = 1
|
||||
|
||||
fun function() {
|
||||
|
||||
}
|
||||
@@ -0,0 +1,11 @@
|
||||
Cleaning output files:
|
||||
out/production/module/test/TestPackage$prop2$*.class
|
||||
out/production/module/test/TestPackage.class
|
||||
End of files
|
||||
Compiling files:
|
||||
src/prop2.kt
|
||||
End of files
|
||||
COMPILATION FAILED
|
||||
Kotlin:ERROR:Platform declaration clash: The following declarations have the same JVM signature (getProperty()I):
|
||||
fun <get-property>(): kotlin.Int
|
||||
fun <get-property>(): kotlin.Int
|
||||
@@ -0,0 +1,3 @@
|
||||
package test
|
||||
|
||||
val property = 1
|
||||
@@ -0,0 +1,5 @@
|
||||
package test
|
||||
|
||||
fun dummy() {
|
||||
|
||||
}
|
||||
@@ -0,0 +1,7 @@
|
||||
package test
|
||||
|
||||
fun dummy() {
|
||||
|
||||
}
|
||||
|
||||
val property = 1
|
||||
Reference in New Issue
Block a user