Add incremental compilation tests with changes of companion object
This commit is contained in:
+24
@@ -1075,6 +1075,30 @@ public class ExperimentalIncrementalJpsTestGenerated extends AbstractExperimenta
|
|||||||
doTest(fileName);
|
doTest(fileName);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@TestMetadata("companionObjectInheritedMemberChanged")
|
||||||
|
public void testCompanionObjectInheritedMemberChanged() throws Exception {
|
||||||
|
String fileName = KotlinTestUtils.navigationMetadata("jps-plugin/testData/incremental/classHierarchyAffected/companionObjectInheritedMemberChanged/");
|
||||||
|
doTest(fileName);
|
||||||
|
}
|
||||||
|
|
||||||
|
@TestMetadata("companionObjectMemberChanged")
|
||||||
|
public void testCompanionObjectMemberChanged() throws Exception {
|
||||||
|
String fileName = KotlinTestUtils.navigationMetadata("jps-plugin/testData/incremental/classHierarchyAffected/companionObjectMemberChanged/");
|
||||||
|
doTest(fileName);
|
||||||
|
}
|
||||||
|
|
||||||
|
@TestMetadata("companionObjectNameChanged")
|
||||||
|
public void testCompanionObjectNameChanged() throws Exception {
|
||||||
|
String fileName = KotlinTestUtils.navigationMetadata("jps-plugin/testData/incremental/classHierarchyAffected/companionObjectNameChanged/");
|
||||||
|
doTest(fileName);
|
||||||
|
}
|
||||||
|
|
||||||
|
@TestMetadata("companionObjectToSimpleObject")
|
||||||
|
public void testCompanionObjectToSimpleObject() throws Exception {
|
||||||
|
String fileName = KotlinTestUtils.navigationMetadata("jps-plugin/testData/incremental/classHierarchyAffected/companionObjectToSimpleObject/");
|
||||||
|
doTest(fileName);
|
||||||
|
}
|
||||||
|
|
||||||
@TestMetadata("constructorVisibilityChanged")
|
@TestMetadata("constructorVisibilityChanged")
|
||||||
public void testConstructorVisibilityChanged() throws Exception {
|
public void testConstructorVisibilityChanged() throws Exception {
|
||||||
String fileName = KotlinTestUtils.navigationMetadata("jps-plugin/testData/incremental/classHierarchyAffected/constructorVisibilityChanged/");
|
String fileName = KotlinTestUtils.navigationMetadata("jps-plugin/testData/incremental/classHierarchyAffected/constructorVisibilityChanged/");
|
||||||
|
|||||||
Vendored
+3
@@ -0,0 +1,3 @@
|
|||||||
|
class A {
|
||||||
|
companion object AA : B()
|
||||||
|
}
|
||||||
Vendored
+3
@@ -0,0 +1,3 @@
|
|||||||
|
open class B {
|
||||||
|
val x: String = ""
|
||||||
|
}
|
||||||
+3
@@ -0,0 +1,3 @@
|
|||||||
|
open class B {
|
||||||
|
val x: String? = null
|
||||||
|
}
|
||||||
+36
@@ -0,0 +1,36 @@
|
|||||||
|
Cleaning output files:
|
||||||
|
out/production/module/B.class
|
||||||
|
End of files
|
||||||
|
Compiling files:
|
||||||
|
src/B.kt
|
||||||
|
End of files
|
||||||
|
Cleaning output files:
|
||||||
|
out/production/module/CompanionExtensionKt.class
|
||||||
|
out/production/module/CompanionReferenceExplicitKt.class
|
||||||
|
out/production/module/CompanionReferenceImplicitKt.class
|
||||||
|
out/production/module/ImportedMemberKt.class
|
||||||
|
out/production/module/META-INF/module.kotlin_module
|
||||||
|
End of files
|
||||||
|
Compiling files:
|
||||||
|
src/companionExtension.kt
|
||||||
|
src/companionReferenceExplicit.kt
|
||||||
|
src/companionReferenceImplicit.kt
|
||||||
|
src/importedMember.kt
|
||||||
|
End of files
|
||||||
|
COMPILATION FAILED
|
||||||
|
Only safe (?.) or non-null asserted (!!.) calls are allowed on a nullable receiver of type kotlin.String?
|
||||||
|
Only safe (?.) or non-null asserted (!!.) calls are allowed on a nullable receiver of type kotlin.String?
|
||||||
|
Only safe (?.) or non-null asserted (!!.) calls are allowed on a nullable receiver of type kotlin.String?
|
||||||
|
Only safe (?.) or non-null asserted (!!.) calls are allowed on a nullable receiver of type kotlin.String?
|
||||||
|
|
||||||
|
|
||||||
|
Cleaning output files:
|
||||||
|
out/production/module/B.class
|
||||||
|
End of files
|
||||||
|
Compiling files:
|
||||||
|
src/B.kt
|
||||||
|
src/companionExtension.kt
|
||||||
|
src/companionReferenceExplicit.kt
|
||||||
|
src/companionReferenceImplicit.kt
|
||||||
|
src/importedMember.kt
|
||||||
|
End of files
|
||||||
+3
@@ -0,0 +1,3 @@
|
|||||||
|
fun A.AA.ext() {
|
||||||
|
x.hashCode()
|
||||||
|
}
|
||||||
+3
@@ -0,0 +1,3 @@
|
|||||||
|
fun A.AA.ext() {
|
||||||
|
x?.hashCode()
|
||||||
|
}
|
||||||
+3
@@ -0,0 +1,3 @@
|
|||||||
|
fun explicitRef() {
|
||||||
|
A.AA.x.hashCode()
|
||||||
|
}
|
||||||
+3
@@ -0,0 +1,3 @@
|
|||||||
|
fun explicitRef() {
|
||||||
|
A.AA.x?.hashCode()
|
||||||
|
}
|
||||||
+3
@@ -0,0 +1,3 @@
|
|||||||
|
fun implicitRef() {
|
||||||
|
A.x.hashCode()
|
||||||
|
}
|
||||||
+3
@@ -0,0 +1,3 @@
|
|||||||
|
fun implicitRef() {
|
||||||
|
A.x?.hashCode()
|
||||||
|
}
|
||||||
+5
@@ -0,0 +1,5 @@
|
|||||||
|
import A.AA.x
|
||||||
|
|
||||||
|
fun importedMember() {
|
||||||
|
x.hashCode()
|
||||||
|
}
|
||||||
+5
@@ -0,0 +1,5 @@
|
|||||||
|
import A.AA.x
|
||||||
|
|
||||||
|
fun importedMember() {
|
||||||
|
x?.hashCode()
|
||||||
|
}
|
||||||
+5
@@ -0,0 +1,5 @@
|
|||||||
|
class A {
|
||||||
|
companion object AA {
|
||||||
|
val x: String = ""
|
||||||
|
}
|
||||||
|
}
|
||||||
Vendored
+5
@@ -0,0 +1,5 @@
|
|||||||
|
class A {
|
||||||
|
companion object AA {
|
||||||
|
val x: String? = ""
|
||||||
|
}
|
||||||
|
}
|
||||||
Vendored
+38
@@ -0,0 +1,38 @@
|
|||||||
|
Cleaning output files:
|
||||||
|
out/production/module/A$AA.class
|
||||||
|
out/production/module/A.class
|
||||||
|
End of files
|
||||||
|
Compiling files:
|
||||||
|
src/A.kt
|
||||||
|
End of files
|
||||||
|
Cleaning output files:
|
||||||
|
out/production/module/CompanionExtensionKt.class
|
||||||
|
out/production/module/CompanionReferenceExplicitKt.class
|
||||||
|
out/production/module/CompanionReferenceImplicitKt.class
|
||||||
|
out/production/module/ImportedMemberKt.class
|
||||||
|
out/production/module/META-INF/module.kotlin_module
|
||||||
|
End of files
|
||||||
|
Compiling files:
|
||||||
|
src/companionExtension.kt
|
||||||
|
src/companionReferenceExplicit.kt
|
||||||
|
src/companionReferenceImplicit.kt
|
||||||
|
src/importedMember.kt
|
||||||
|
End of files
|
||||||
|
COMPILATION FAILED
|
||||||
|
Only safe (?.) or non-null asserted (!!.) calls are allowed on a nullable receiver of type kotlin.String?
|
||||||
|
Only safe (?.) or non-null asserted (!!.) calls are allowed on a nullable receiver of type kotlin.String?
|
||||||
|
Only safe (?.) or non-null asserted (!!.) calls are allowed on a nullable receiver of type kotlin.String?
|
||||||
|
Only safe (?.) or non-null asserted (!!.) calls are allowed on a nullable receiver of type kotlin.String?
|
||||||
|
|
||||||
|
|
||||||
|
Cleaning output files:
|
||||||
|
out/production/module/A$AA.class
|
||||||
|
out/production/module/A.class
|
||||||
|
End of files
|
||||||
|
Compiling files:
|
||||||
|
src/A.kt
|
||||||
|
src/companionExtension.kt
|
||||||
|
src/companionReferenceExplicit.kt
|
||||||
|
src/companionReferenceImplicit.kt
|
||||||
|
src/importedMember.kt
|
||||||
|
End of files
|
||||||
+3
@@ -0,0 +1,3 @@
|
|||||||
|
fun A.AA.ext() {
|
||||||
|
x.hashCode()
|
||||||
|
}
|
||||||
+3
@@ -0,0 +1,3 @@
|
|||||||
|
fun A.AA.ext() {
|
||||||
|
x?.hashCode()
|
||||||
|
}
|
||||||
+3
@@ -0,0 +1,3 @@
|
|||||||
|
fun explicitRef() {
|
||||||
|
A.AA.x.hashCode()
|
||||||
|
}
|
||||||
+3
@@ -0,0 +1,3 @@
|
|||||||
|
fun explicitRef() {
|
||||||
|
A.AA.x?.hashCode()
|
||||||
|
}
|
||||||
+3
@@ -0,0 +1,3 @@
|
|||||||
|
fun implicitRef() {
|
||||||
|
A.x.hashCode()
|
||||||
|
}
|
||||||
+3
@@ -0,0 +1,3 @@
|
|||||||
|
fun implicitRef() {
|
||||||
|
A.x?.hashCode()
|
||||||
|
}
|
||||||
+5
@@ -0,0 +1,5 @@
|
|||||||
|
import A.AA.x
|
||||||
|
|
||||||
|
fun importedMember() {
|
||||||
|
x.hashCode()
|
||||||
|
}
|
||||||
+5
@@ -0,0 +1,5 @@
|
|||||||
|
import A.AA.x
|
||||||
|
|
||||||
|
fun importedMember() {
|
||||||
|
x?.hashCode()
|
||||||
|
}
|
||||||
+5
@@ -0,0 +1,5 @@
|
|||||||
|
class A {
|
||||||
|
companion object {
|
||||||
|
val x: String = ""
|
||||||
|
}
|
||||||
|
}
|
||||||
Vendored
+5
@@ -0,0 +1,5 @@
|
|||||||
|
class A {
|
||||||
|
companion object AA {
|
||||||
|
val x: String = ""
|
||||||
|
}
|
||||||
|
}
|
||||||
Vendored
+33
@@ -0,0 +1,33 @@
|
|||||||
|
Cleaning output files:
|
||||||
|
out/production/module/A$Companion.class
|
||||||
|
out/production/module/A.class
|
||||||
|
End of files
|
||||||
|
Compiling files:
|
||||||
|
src/A.kt
|
||||||
|
End of files
|
||||||
|
Cleaning output files:
|
||||||
|
out/production/module/CompanionExtensionKt.class
|
||||||
|
out/production/module/CompanionReferenceExplicitKt.class
|
||||||
|
out/production/module/CompanionReferenceImplicitKt.class
|
||||||
|
out/production/module/META-INF/module.kotlin_module
|
||||||
|
End of files
|
||||||
|
Compiling files:
|
||||||
|
src/companionExtension.kt
|
||||||
|
src/companionReferenceExplicit.kt
|
||||||
|
src/companionReferenceImplicit.kt
|
||||||
|
End of files
|
||||||
|
COMPILATION FAILED
|
||||||
|
Unresolved reference: Companion
|
||||||
|
Unresolved reference: Companion
|
||||||
|
|
||||||
|
|
||||||
|
Cleaning output files:
|
||||||
|
out/production/module/A$AA.class
|
||||||
|
out/production/module/A.class
|
||||||
|
End of files
|
||||||
|
Compiling files:
|
||||||
|
src/A.kt
|
||||||
|
src/companionExtension.kt
|
||||||
|
src/companionReferenceExplicit.kt
|
||||||
|
src/companionReferenceImplicit.kt
|
||||||
|
End of files
|
||||||
+3
@@ -0,0 +1,3 @@
|
|||||||
|
fun A.Companion.ext() {
|
||||||
|
x.hashCode()
|
||||||
|
}
|
||||||
+3
@@ -0,0 +1,3 @@
|
|||||||
|
fun A.AA.ext() {
|
||||||
|
x.hashCode()
|
||||||
|
}
|
||||||
+3
@@ -0,0 +1,3 @@
|
|||||||
|
fun explicitRef() {
|
||||||
|
A.Companion.x.hashCode()
|
||||||
|
}
|
||||||
+3
@@ -0,0 +1,3 @@
|
|||||||
|
fun explicitRef() {
|
||||||
|
A.AA.x.hashCode()
|
||||||
|
}
|
||||||
+3
@@ -0,0 +1,3 @@
|
|||||||
|
fun implicitRef() {
|
||||||
|
A.x.hashCode()
|
||||||
|
}
|
||||||
+5
@@ -0,0 +1,5 @@
|
|||||||
|
class A {
|
||||||
|
companion object AA {
|
||||||
|
val x: String = ""
|
||||||
|
}
|
||||||
|
}
|
||||||
Vendored
+5
@@ -0,0 +1,5 @@
|
|||||||
|
class A {
|
||||||
|
object AA {
|
||||||
|
val x: String = ""
|
||||||
|
}
|
||||||
|
}
|
||||||
Vendored
+32
@@ -0,0 +1,32 @@
|
|||||||
|
Cleaning output files:
|
||||||
|
out/production/module/A$AA.class
|
||||||
|
out/production/module/A.class
|
||||||
|
End of files
|
||||||
|
Compiling files:
|
||||||
|
src/A.kt
|
||||||
|
End of files
|
||||||
|
Cleaning output files:
|
||||||
|
out/production/module/CompanionExtensionKt.class
|
||||||
|
out/production/module/CompanionReferenceExplicitKt.class
|
||||||
|
out/production/module/CompanionReferenceImplicitKt.class
|
||||||
|
out/production/module/META-INF/module.kotlin_module
|
||||||
|
End of files
|
||||||
|
Compiling files:
|
||||||
|
src/companionExtension.kt
|
||||||
|
src/companionReferenceExplicit.kt
|
||||||
|
src/companionReferenceImplicit.kt
|
||||||
|
End of files
|
||||||
|
COMPILATION FAILED
|
||||||
|
Unresolved reference: x
|
||||||
|
|
||||||
|
|
||||||
|
Cleaning output files:
|
||||||
|
out/production/module/A$AA.class
|
||||||
|
out/production/module/A.class
|
||||||
|
End of files
|
||||||
|
Compiling files:
|
||||||
|
src/A.kt
|
||||||
|
src/companionExtension.kt
|
||||||
|
src/companionReferenceExplicit.kt
|
||||||
|
src/companionReferenceImplicit.kt
|
||||||
|
End of files
|
||||||
+3
@@ -0,0 +1,3 @@
|
|||||||
|
fun A.AA.ext() {
|
||||||
|
x.hashCode()
|
||||||
|
}
|
||||||
+3
@@ -0,0 +1,3 @@
|
|||||||
|
fun explicitRef() {
|
||||||
|
A.AA.x.hashCode()
|
||||||
|
}
|
||||||
+3
@@ -0,0 +1,3 @@
|
|||||||
|
fun implicitRef() {
|
||||||
|
A.x.hashCode()
|
||||||
|
}
|
||||||
+3
@@ -0,0 +1,3 @@
|
|||||||
|
fun implicitRef() {
|
||||||
|
A.AA.x.hashCode()
|
||||||
|
}
|
||||||
Reference in New Issue
Block a user