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,4 @@
public class Sub: Super() {
private fun y() {
}
}
@@ -0,0 +1,4 @@
public class Super {
public void x() {
}
}
@@ -0,0 +1,7 @@
public class Super {
public void x() {
}
public void y() {
}
}
@@ -0,0 +1,15 @@
Cleaning output files:
out/production/module/Super.class
End of files
Compiling files:
src/Super.java
End of files
Cleaning output files:
out/production/module/Sub.class
End of files
Compiling files:
src/Sub.kt
End of files
COMPILATION FAILED
Kotlin:ERROR:Cannot weaken access privilege 'public' for 'y' in 'Super'
Kotlin:ERROR:'y' hides member of supertype 'Super' and needs 'override' modifier