[CHERRY PICKED FROM IJ] [testdata] Replace test IncrementalJvmJpsTestGenerated.WithJava.JavaUsedInKotlin.testMixedInheritance with new one
Replace test because JPS recompile inherited classes only in case of existence of direct use (like override or direct call of parent methods). Tested cases: *Add new abstract method when derived class does not abstract *Add and remove method, when such method is present in derived class *Change return type/access modifier GitOrigin-RevId: 767e58ba3d3e4069838c717666329b43f1b8e936 Original commit: https://github.com/JetBrains/intellij-community/commit/d738c61aaefe95acd8130066f53f8d8bcadfa977
This commit is contained in:
committed by
Space
parent
aa1700f3e7
commit
411a0ecc38
Vendored
+3
@@ -0,0 +1,3 @@
|
||||
abstract public class BaseClass {
|
||||
|
||||
}
|
||||
Vendored
+4
@@ -0,0 +1,4 @@
|
||||
// add abstract method, when derived class is not abstract
|
||||
abstract public class BaseClass {
|
||||
abstract void myAbs();
|
||||
}
|
||||
Vendored
+3
@@ -0,0 +1,3 @@
|
||||
// fix
|
||||
public class BaseClass {
|
||||
}
|
||||
Vendored
+6
@@ -0,0 +1,6 @@
|
||||
// add method to Base, that does not clash with derived
|
||||
public class BaseClass {
|
||||
void doSmthAnother() {
|
||||
System.out.println(":)");
|
||||
}
|
||||
}
|
||||
Vendored
+7
@@ -0,0 +1,7 @@
|
||||
// add method to Base, that CLASH with derived
|
||||
public class BaseClass {
|
||||
void doSmthAnother() {
|
||||
System.out.println(":)");
|
||||
}
|
||||
void doSmth() {}
|
||||
}
|
||||
Vendored
+6
@@ -0,0 +1,6 @@
|
||||
// fix clash
|
||||
public class BaseClass {
|
||||
void doSmthAnother() {
|
||||
System.out.println(":)");
|
||||
}
|
||||
}
|
||||
Vendored
+6
@@ -0,0 +1,6 @@
|
||||
// change return type
|
||||
public class BaseClass {
|
||||
String doSmthAnother() {
|
||||
return ":)";
|
||||
}
|
||||
}
|
||||
Vendored
-3
@@ -1,3 +0,0 @@
|
||||
open class BaseClass {
|
||||
fun foo() {}
|
||||
}
|
||||
Vendored
-3
@@ -1,3 +0,0 @@
|
||||
open class BaseClass {
|
||||
fun foo(): String = "OK"
|
||||
}
|
||||
Vendored
-2
@@ -1,2 +0,0 @@
|
||||
public class DerivedClass1 extends BaseClass {
|
||||
}
|
||||
Vendored
+3
@@ -0,0 +1,3 @@
|
||||
open class DerivedClass1 : BaseClass() {
|
||||
fun doSmth() {}
|
||||
}
|
||||
+6
@@ -0,0 +1,6 @@
|
||||
open class DerivedClass1 : BaseClass() {
|
||||
fun doSmth() {}
|
||||
override fun doSmthAnother() {
|
||||
println(":))")
|
||||
}
|
||||
}
|
||||
Vendored
-2
@@ -1,2 +0,0 @@
|
||||
class DerivedClass2 : DerivedClass1() {
|
||||
}
|
||||
+109
-18
@@ -2,33 +2,124 @@
|
||||
|
||||
Cleaning output files:
|
||||
out/production/module/BaseClass.class
|
||||
out/production/module/META-INF/module.kotlin_module
|
||||
End of files
|
||||
Compiling files:
|
||||
src/BaseClass.kt
|
||||
End of files
|
||||
Marked as dirty by Kotlin:
|
||||
src/usage1.kt
|
||||
src/usage2.kt
|
||||
src/usage3.kt
|
||||
Exit code: ADDITIONAL_PASS_REQUIRED
|
||||
Exit code: NOTHING_DONE
|
||||
------------------------------------------
|
||||
Compiling files:
|
||||
src/BaseClass.java
|
||||
End of files
|
||||
Cleaning output files:
|
||||
out/production/module/DerivedClass1.class
|
||||
out/production/module/DerivedClass2.class
|
||||
out/production/module/META-INF/module.kotlin_module
|
||||
out/production/module/Usage1Kt.class
|
||||
out/production/module/Usage2Kt.class
|
||||
out/production/module/Usage3Kt.class
|
||||
End of files
|
||||
Compiling files:
|
||||
src/DerivedClass2.kt
|
||||
src/usage1.kt
|
||||
src/usage2.kt
|
||||
src/usage3.kt
|
||||
src/DerivedClass1.kt
|
||||
End of files
|
||||
Exit code: ABORT
|
||||
------------------------------------------
|
||||
COMPILATION FAILED
|
||||
Class 'DerivedClass1' is not abstract and does not implement abstract base class member public/*package*/ abstract fun myAbs(): Unit defined in BaseClass
|
||||
|
||||
================ Step #2 =================
|
||||
|
||||
Cleaning output files:
|
||||
out/production/module/BaseClass.class
|
||||
End of files
|
||||
Compiling files:
|
||||
src/DerivedClass1.kt
|
||||
End of files
|
||||
Exit code: OK
|
||||
------------------------------------------
|
||||
Compiling files:
|
||||
src/DerivedClass1.java
|
||||
src/BaseClass.java
|
||||
End of files
|
||||
|
||||
================ Step #3 =================
|
||||
|
||||
Cleaning output files:
|
||||
out/production/module/BaseClass.class
|
||||
End of files
|
||||
Exit code: NOTHING_DONE
|
||||
------------------------------------------
|
||||
Compiling files:
|
||||
src/BaseClass.java
|
||||
End of files
|
||||
|
||||
================ Step #4 =================
|
||||
|
||||
Cleaning output files:
|
||||
out/production/module/BaseClass.class
|
||||
End of files
|
||||
Exit code: NOTHING_DONE
|
||||
------------------------------------------
|
||||
Compiling files:
|
||||
src/BaseClass.java
|
||||
End of files
|
||||
Cleaning output files:
|
||||
out/production/module/DerivedClass1.class
|
||||
out/production/module/META-INF/module.kotlin_module
|
||||
End of files
|
||||
Compiling files:
|
||||
src/DerivedClass1.kt
|
||||
End of files
|
||||
Exit code: ABORT
|
||||
------------------------------------------
|
||||
COMPILATION FAILED
|
||||
'doSmth' hides member of supertype 'BaseClass' and needs 'override' modifier
|
||||
|
||||
================ Step #5 =================
|
||||
|
||||
Cleaning output files:
|
||||
out/production/module/BaseClass.class
|
||||
End of files
|
||||
Compiling files:
|
||||
src/DerivedClass1.kt
|
||||
End of files
|
||||
Exit code: OK
|
||||
------------------------------------------
|
||||
Compiling files:
|
||||
src/BaseClass.java
|
||||
End of files
|
||||
Cleaning output files:
|
||||
out/production/module/DerivedClass1.class
|
||||
out/production/module/META-INF/module.kotlin_module
|
||||
End of files
|
||||
Compiling files:
|
||||
src/DerivedClass1.kt
|
||||
End of files
|
||||
Exit code: OK
|
||||
------------------------------------------
|
||||
|
||||
================ Step #6 =================
|
||||
|
||||
Cleaning output files:
|
||||
out/production/module/DerivedClass1.class
|
||||
out/production/module/META-INF/module.kotlin_module
|
||||
End of files
|
||||
Compiling files:
|
||||
src/DerivedClass1.kt
|
||||
End of files
|
||||
Exit code: OK
|
||||
------------------------------------------
|
||||
|
||||
================ Step #7 =================
|
||||
|
||||
Cleaning output files:
|
||||
out/production/module/BaseClass.class
|
||||
End of files
|
||||
Exit code: NOTHING_DONE
|
||||
------------------------------------------
|
||||
Compiling files:
|
||||
src/BaseClass.java
|
||||
End of files
|
||||
Cleaning output files:
|
||||
out/production/module/DerivedClass1.class
|
||||
out/production/module/META-INF/module.kotlin_module
|
||||
End of files
|
||||
Compiling files:
|
||||
src/DerivedClass1.kt
|
||||
End of files
|
||||
Exit code: ABORT
|
||||
------------------------------------------
|
||||
COMPILATION FAILED
|
||||
Return type of 'doSmthAnother' is not a subtype of the return type of the overridden member 'public/*package*/ open fun doSmthAnother(): String! defined in BaseClass'
|
||||
Vendored
-10
@@ -1,10 +0,0 @@
|
||||
================ Step #1 =================
|
||||
|
||||
Compiling files:
|
||||
src/BaseClass.kt
|
||||
src/usage1.kt
|
||||
src/usage2.kt
|
||||
src/usage3.kt
|
||||
End of files
|
||||
Exit code: OK
|
||||
|
||||
-3
@@ -1,3 +0,0 @@
|
||||
fun main4() {
|
||||
DerivedClass2().hashCode()
|
||||
}
|
||||
-3
@@ -1,3 +0,0 @@
|
||||
fun main1() {
|
||||
BaseClass().foo()
|
||||
}
|
||||
-3
@@ -1,3 +0,0 @@
|
||||
fun main2() {
|
||||
DerivedClass1().foo()
|
||||
}
|
||||
-3
@@ -1,3 +0,0 @@
|
||||
fun main3() {
|
||||
DerivedClass2().foo()
|
||||
}
|
||||
Reference in New Issue
Block a user