Added tests with adding method to superclass.

This commit is contained in:
Evgeny Gerashchenko
2014-10-24 15:57:07 +04:00
parent 86dd7ec880
commit 3237791433
9 changed files with 69 additions and 0 deletions
@@ -0,0 +1,5 @@
public class Sub extends Super {
private void y() {
}
}
@@ -0,0 +1,4 @@
public open class Super {
public fun x() {
}
}
@@ -0,0 +1,7 @@
public open class Super {
public fun x() {
}
public fun y() {
}
}
@@ -0,0 +1,11 @@
Cleaning output files:
out/production/module/Super.class
End of files
Compiling files:
src/Super.kt
End of files
Compiling files:
src/Sub.java
End of files
COMPILATION FAILED
java:ERROR:$PROJECT/src/Sub.java:2: y() in Sub cannot override y() in Super; overridden method is final