ACCIDENTAL_OVERRIDE diagnostics supported

#KT-1 In Progress
This commit is contained in:
Andrey Breslav
2014-06-05 20:53:31 +04:00
parent d2e464a02b
commit 27f76630e6
22 changed files with 251 additions and 25 deletions
+7 -1
View File
@@ -1,4 +1,10 @@
class A {
open class B {
val x = 1
}
class A : B() {
fun getX() = 1
fun getA(): Int = 1
val a: Int = 1
}
+5 -4
View File
@@ -1,5 +1,6 @@
ERROR: $TESTDATA_DIR$/signatureClash.kt: (2, 5) Platform declaration clash: 'getA()I'
ERROR: $TESTDATA_DIR$/signatureClash.kt: (3, 5) Platform declaration clash: 'getA()I'
ERROR: $TESTDATA_DIR$/signatureClash.kt: (6, 1) Platform declaration clash: 'getB()I'
ERROR: $TESTDATA_DIR$/signatureClash.kt: (7, 1) Platform declaration clash: 'getB()I'
ERROR: $TESTDATA_DIR$/signatureClash.kt: (6, 5) Accidental override: 'getX()I'
ERROR: $TESTDATA_DIR$/signatureClash.kt: (8, 5) Platform declaration clash: 'getA()I'
ERROR: $TESTDATA_DIR$/signatureClash.kt: (9, 5) Platform declaration clash: 'getA()I'
ERROR: $TESTDATA_DIR$/signatureClash.kt: (12, 1) Platform declaration clash: 'getB()I'
ERROR: $TESTDATA_DIR$/signatureClash.kt: (13, 1) Platform declaration clash: 'getB()I'
COMPILATION_ERROR