Add tests for class hierarchy incremental recompilation

This commit is contained in:
Alexey Tsvetkov
2015-12-17 21:30:17 +03:00
parent e2794cfa3f
commit 9190029fcc
206 changed files with 1602 additions and 3 deletions
@@ -0,0 +1,5 @@
package foo
open class A {
open fun f() {}
}
@@ -0,0 +1,5 @@
package foo
class A {
open fun f() {}
}
@@ -0,0 +1,5 @@
package foo
open class A {
open fun f() {}
}
@@ -0,0 +1,3 @@
package foo
open class AChild : A()
@@ -0,0 +1,3 @@
package foo
open class AGrandChild : AChild()
@@ -0,0 +1,3 @@
package foo
class ATypeParameter<T : A>
@@ -0,0 +1,55 @@
Cleaning output files:
out/production/module/foo/A.class
End of files
Compiling files:
src/A.kt
End of files
Cleaning output files:
out/production/module/META-INF/module.kotlin_module
out/production/module/bar/ImportStarKt.class
out/production/module/bar/ReferencedByFqNameKt.class
out/production/module/foo/AChild.class
out/production/module/foo/AGrandChild.class
out/production/module/foo/ATypeParameter.class
out/production/module/foo/ClassLiteralKt.class
out/production/module/foo/FunctionParameterKt.class
out/production/module/foo/GetAKt.class
out/production/module/foo/ReturnTypeImplicitKt.class
out/production/module/foo/ReturnTypeKt.class
End of files
Compiling files:
src/AChild.kt
src/AGrandChild.kt
src/ATypeParameter.kt
src/classLiteral.kt
src/functionParameter.kt
src/getA.kt
src/importA.kt
src/importAGrandChild.kt
src/importStar.kt
src/referencedByFqName.kt
src/returnType.kt
src/returnTypeImplicit.kt
End of files
COMPILATION FAILED
This type is final, so it cannot be inherited from
Cleaning output files:
out/production/module/foo/A.class
End of files
Compiling files:
src/A.kt
src/AChild.kt
src/AGrandChild.kt
src/ATypeParameter.kt
src/classLiteral.kt
src/functionParameter.kt
src/getA.kt
src/importA.kt
src/importAGrandChild.kt
src/importStar.kt
src/referencedByFqName.kt
src/returnType.kt
src/returnTypeImplicit.kt
End of files
@@ -0,0 +1,5 @@
package foo
fun classLiteral() {
A::class
}
@@ -0,0 +1,5 @@
package foo
fun useA(a: A) {
a.f()
}
@@ -0,0 +1,3 @@
package foo
fun getA() = A()
@@ -0,0 +1,3 @@
package bar
import foo.A
@@ -0,0 +1,3 @@
package bar
import foo.AGrandChild
@@ -0,0 +1,7 @@
package bar
import foo.*
fun importStarUse() {
A()
}
@@ -0,0 +1,5 @@
package bar
fun createAByFqName() {
foo.A()
}
@@ -0,0 +1,3 @@
package foo
fun getAExplicit(): A = A()
@@ -0,0 +1,3 @@
package foo
fun getAImplicit() = getA()