Added tests with adding method to superclass.
This commit is contained in:
@@ -0,0 +1,5 @@
|
||||
public class Sub extends Super {
|
||||
private void y() {
|
||||
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,4 @@
|
||||
public open class Super {
|
||||
public fun x() {
|
||||
}
|
||||
}
|
||||
+7
@@ -0,0 +1,7 @@
|
||||
public open class Super {
|
||||
public fun x() {
|
||||
}
|
||||
|
||||
public fun y() {
|
||||
}
|
||||
}
|
||||
+11
@@ -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
|
||||
Reference in New Issue
Block a user