Added tests with adding method to superclass.
Original commit: 3237791433
This commit is contained in:
@@ -358,6 +358,12 @@ public class IncrementalJpsTestGenerated extends AbstractIncrementalJpsTest {
|
||||
doTest(fileName);
|
||||
}
|
||||
|
||||
@TestMetadata("methodAddedInSuper")
|
||||
public void testMethodAddedInSuper() throws Exception {
|
||||
String fileName = JetTestUtils.navigationMetadata("jps-plugin/testData/incremental/withJava/javaUsedInKotlin/methodAddedInSuper/");
|
||||
doTest(fileName);
|
||||
}
|
||||
|
||||
@TestMetadata("methodRenamed")
|
||||
public void testMethodRenamed() throws Exception {
|
||||
String fileName = JetTestUtils.navigationMetadata("jps-plugin/testData/incremental/withJava/javaUsedInKotlin/methodRenamed/");
|
||||
@@ -411,6 +417,12 @@ public class IncrementalJpsTestGenerated extends AbstractIncrementalJpsTest {
|
||||
doTest(fileName);
|
||||
}
|
||||
|
||||
@TestMetadata("methodAddedInSuper")
|
||||
public void testMethodAddedInSuper() throws Exception {
|
||||
String fileName = JetTestUtils.navigationMetadata("jps-plugin/testData/incremental/withJava/kotlinUsedInJava/methodAddedInSuper/");
|
||||
doTest(fileName);
|
||||
}
|
||||
|
||||
@TestMetadata("notChangeSignature")
|
||||
public void testNotChangeSignature() throws Exception {
|
||||
String fileName = JetTestUtils.navigationMetadata("jps-plugin/testData/incremental/withJava/kotlinUsedInJava/notChangeSignature/");
|
||||
|
||||
+4
@@ -0,0 +1,4 @@
|
||||
public class Sub: Super() {
|
||||
private fun y() {
|
||||
}
|
||||
}
|
||||
+4
@@ -0,0 +1,4 @@
|
||||
public class Super {
|
||||
public void x() {
|
||||
}
|
||||
}
|
||||
+7
@@ -0,0 +1,7 @@
|
||||
public class Super {
|
||||
public void x() {
|
||||
}
|
||||
|
||||
public void y() {
|
||||
}
|
||||
}
|
||||
+15
@@ -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
|
||||
+5
@@ -0,0 +1,5 @@
|
||||
public class Sub extends Super {
|
||||
private void y() {
|
||||
|
||||
}
|
||||
}
|
||||
+4
@@ -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