Add incremental compilation tests with changes of companion object

This commit is contained in:
Alexey Tsvetkov
2015-12-24 15:05:34 +03:00
parent 618f9f62f6
commit a7c432ebe8
39 changed files with 285 additions and 0 deletions
@@ -0,0 +1,3 @@
class A {
companion object AA : B()
}
@@ -0,0 +1,3 @@
open class B {
val x: String = ""
}
@@ -0,0 +1,3 @@
open class B {
val x: String? = null
}
@@ -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
@@ -0,0 +1,3 @@
fun A.AA.ext() {
x.hashCode()
}
@@ -0,0 +1,3 @@
fun A.AA.ext() {
x?.hashCode()
}
@@ -0,0 +1,3 @@
fun explicitRef() {
A.AA.x.hashCode()
}
@@ -0,0 +1,3 @@
fun explicitRef() {
A.AA.x?.hashCode()
}
@@ -0,0 +1,3 @@
fun implicitRef() {
A.x.hashCode()
}
@@ -0,0 +1,3 @@
fun implicitRef() {
A.x?.hashCode()
}
@@ -0,0 +1,5 @@
import A.AA.x
fun importedMember() {
x.hashCode()
}
@@ -0,0 +1,5 @@
import A.AA.x
fun importedMember() {
x?.hashCode()
}
@@ -0,0 +1,5 @@
class A {
companion object AA {
val x: String = ""
}
}
@@ -0,0 +1,5 @@
class A {
companion object AA {
val x: String? = ""
}
}
@@ -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
@@ -0,0 +1,3 @@
fun A.AA.ext() {
x.hashCode()
}
@@ -0,0 +1,3 @@
fun A.AA.ext() {
x?.hashCode()
}
@@ -0,0 +1,3 @@
fun explicitRef() {
A.AA.x.hashCode()
}
@@ -0,0 +1,3 @@
fun explicitRef() {
A.AA.x?.hashCode()
}
@@ -0,0 +1,3 @@
fun implicitRef() {
A.x.hashCode()
}
@@ -0,0 +1,3 @@
fun implicitRef() {
A.x?.hashCode()
}
@@ -0,0 +1,5 @@
import A.AA.x
fun importedMember() {
x.hashCode()
}
@@ -0,0 +1,5 @@
import A.AA.x
fun importedMember() {
x?.hashCode()
}
@@ -0,0 +1,5 @@
class A {
companion object {
val x: String = ""
}
}
@@ -0,0 +1,5 @@
class A {
companion object AA {
val x: String = ""
}
}
@@ -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
@@ -0,0 +1,3 @@
fun A.Companion.ext() {
x.hashCode()
}
@@ -0,0 +1,3 @@
fun A.AA.ext() {
x.hashCode()
}
@@ -0,0 +1,3 @@
fun explicitRef() {
A.Companion.x.hashCode()
}
@@ -0,0 +1,3 @@
fun explicitRef() {
A.AA.x.hashCode()
}
@@ -0,0 +1,3 @@
fun implicitRef() {
A.x.hashCode()
}
@@ -0,0 +1,5 @@
class A {
companion object AA {
val x: String = ""
}
}
@@ -0,0 +1,5 @@
class A {
object AA {
val x: String = ""
}
}
@@ -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
@@ -0,0 +1,3 @@
fun A.AA.ext() {
x.hashCode()
}
@@ -0,0 +1,3 @@
fun explicitRef() {
A.AA.x.hashCode()
}
@@ -0,0 +1,3 @@
fun implicitRef() {
A.x.hashCode()
}
@@ -0,0 +1,3 @@
fun implicitRef() {
A.AA.x.hashCode()
}