Move JVM specific IC tests with class hierarchy changes
This commit is contained in:
@@ -0,0 +1,11 @@
|
||||
open class A {
|
||||
companion object {
|
||||
@JvmStatic
|
||||
fun f() {}
|
||||
|
||||
@JvmStatic
|
||||
fun g() {}
|
||||
}
|
||||
|
||||
fun h() {}
|
||||
}
|
||||
@@ -0,0 +1,3 @@
|
||||
class AChild : A() {
|
||||
fun j() {}
|
||||
}
|
||||
+3
@@ -0,0 +1,3 @@
|
||||
class AChild {
|
||||
fun j() {}
|
||||
}
|
||||
+4
@@ -0,0 +1,4 @@
|
||||
@file:JvmName("A")
|
||||
@file:JvmMultifileClass
|
||||
|
||||
fun f() {}
|
||||
+4
@@ -0,0 +1,4 @@
|
||||
@file:JvmName("A")
|
||||
@file:JvmMultifileClass
|
||||
|
||||
fun g() {}
|
||||
+56
@@ -0,0 +1,56 @@
|
||||
================ Step #1 =================
|
||||
|
||||
Cleaning output files:
|
||||
out/production/module/A$Companion.class
|
||||
out/production/module/A.class
|
||||
End of files
|
||||
Cleaning output files:
|
||||
out/production/module/AChild.class
|
||||
out/production/module/GetAKt.class
|
||||
out/production/module/META-INF/module.kotlin_module
|
||||
out/production/module/UseFKt.class
|
||||
out/production/module/UseGKt.class
|
||||
out/production/module/UseHKt.class
|
||||
End of files
|
||||
Compiling files:
|
||||
src/AChild.kt
|
||||
src/APartF.kt
|
||||
src/APartG.kt
|
||||
src/getA.kt
|
||||
src/useF.kt
|
||||
src/useG.kt
|
||||
src/useH.kt
|
||||
End of files
|
||||
Exit code: ABORT
|
||||
------------------------------------------
|
||||
COMPILATION FAILED
|
||||
Unresolved reference: A
|
||||
Unresolved reference: A
|
||||
Unresolved reference: A
|
||||
Unresolved reference: A
|
||||
|
||||
================ Step #2 =================
|
||||
|
||||
Compiling files:
|
||||
src/AChild.kt
|
||||
src/APartF.kt
|
||||
src/APartG.kt
|
||||
src/useF.kt
|
||||
src/useG.kt
|
||||
End of files
|
||||
Marked as dirty by Kotlin:
|
||||
src/getAChild.kt
|
||||
src/useJ.kt
|
||||
Exit code: ADDITIONAL_PASS_REQUIRED
|
||||
------------------------------------------
|
||||
Cleaning output files:
|
||||
out/production/module/GetAChildKt.class
|
||||
out/production/module/META-INF/module.kotlin_module
|
||||
out/production/module/UseJKt.class
|
||||
End of files
|
||||
Compiling files:
|
||||
src/getAChild.kt
|
||||
src/useJ.kt
|
||||
End of files
|
||||
Exit code: OK
|
||||
------------------------------------------
|
||||
@@ -0,0 +1 @@
|
||||
fun getA() = A()
|
||||
+1
@@ -0,0 +1 @@
|
||||
fun getAChild() = AChild()
|
||||
@@ -0,0 +1,3 @@
|
||||
fun useF() {
|
||||
A.f()
|
||||
}
|
||||
+3
@@ -0,0 +1,3 @@
|
||||
fun useF() {
|
||||
f()
|
||||
}
|
||||
@@ -0,0 +1,3 @@
|
||||
fun useG() {
|
||||
A.g()
|
||||
}
|
||||
+3
@@ -0,0 +1,3 @@
|
||||
fun useG() {
|
||||
g()
|
||||
}
|
||||
@@ -0,0 +1,3 @@
|
||||
fun useH() {
|
||||
getA().h()
|
||||
}
|
||||
@@ -0,0 +1,3 @@
|
||||
fun useJ() {
|
||||
getAChild().j()
|
||||
}
|
||||
Vendored
+10
@@ -0,0 +1,10 @@
|
||||
abstract class Introspector<M : Model>(protected val model: Model) {
|
||||
protected abstract inner class Retriever(protected val transaction: Any) {
|
||||
protected var model: Model = this@Introspector.model
|
||||
}
|
||||
|
||||
protected abstract inner class SchemaRetriever(transaction: Any): Retriever(transaction) {
|
||||
protected inline fun inSchema(crossinline modifier: (Any) -> Unit) =
|
||||
model.modify { schema -> modifier.invoke(schema) }
|
||||
}
|
||||
}
|
||||
+12
@@ -0,0 +1,12 @@
|
||||
class IntrospectorImpl(model: ModuleImpl) : Introspector<ModuleImpl>(model) {
|
||||
private inner class SchemaRetriever(transaction: Any) : Introspector<ModuleImpl>.SchemaRetriever(transaction) {
|
||||
internal fun retrieve() {
|
||||
inSchema { schema -> println(schema) }
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
class ModuleImpl : Model {
|
||||
override fun modify(modifier: ModelModifier) {}
|
||||
}
|
||||
|
||||
Vendored
+4
@@ -0,0 +1,4 @@
|
||||
public interface Model {
|
||||
void modify(ModelModifier modifier);
|
||||
}
|
||||
|
||||
+3
@@ -0,0 +1,3 @@
|
||||
public interface ModelModifier {
|
||||
void perform(Object element);
|
||||
}
|
||||
Vendored
+7
@@ -0,0 +1,7 @@
|
||||
================ Step #1 =================
|
||||
|
||||
Compiling files:
|
||||
src/IntrospectorImpl.kt
|
||||
End of files
|
||||
Exit code: OK
|
||||
------------------------------------------
|
||||
@@ -0,0 +1,6 @@
|
||||
package foo
|
||||
|
||||
open class A {
|
||||
@JvmName("g")
|
||||
fun f() {}
|
||||
}
|
||||
@@ -0,0 +1,6 @@
|
||||
package foo
|
||||
|
||||
open class A {
|
||||
@JvmName("h")
|
||||
fun f() {}
|
||||
}
|
||||
@@ -0,0 +1,3 @@
|
||||
package foo
|
||||
|
||||
class AChild : A()
|
||||
@@ -0,0 +1,24 @@
|
||||
================ Step #1 =================
|
||||
|
||||
Cleaning output files:
|
||||
out/production/module/foo/A.class
|
||||
End of files
|
||||
Compiling files:
|
||||
src/A.kt
|
||||
End of files
|
||||
Marked as dirty by Kotlin:
|
||||
src/AChild.kt
|
||||
src/useAChild.kt
|
||||
Exit code: ADDITIONAL_PASS_REQUIRED
|
||||
------------------------------------------
|
||||
Cleaning output files:
|
||||
out/production/module/META-INF/module.kotlin_module
|
||||
out/production/module/foo/AChild.class
|
||||
out/production/module/foo/UseAChildKt.class
|
||||
End of files
|
||||
Compiling files:
|
||||
src/AChild.kt
|
||||
src/useAChild.kt
|
||||
End of files
|
||||
Exit code: OK
|
||||
------------------------------------------
|
||||
@@ -0,0 +1,5 @@
|
||||
package foo
|
||||
|
||||
fun useAChild(a: AChild) {
|
||||
a.f()
|
||||
}
|
||||
+32
@@ -0,0 +1,32 @@
|
||||
================ Step #1 =================
|
||||
|
||||
Cleaning output files:
|
||||
out/production/module/META-INF/module.kotlin_module
|
||||
out/production/module/Utils.class
|
||||
out/production/module/Utils__PartBKt.class
|
||||
End of files
|
||||
Compiling files:
|
||||
src/partB.kt
|
||||
End of files
|
||||
Marked as dirty by Kotlin:
|
||||
src/partA.kt
|
||||
src/useFooF.kt
|
||||
src/useFooG.kt
|
||||
Exit code: ADDITIONAL_PASS_REQUIRED
|
||||
------------------------------------------
|
||||
Cleaning output files:
|
||||
out/production/module/META-INF/module.kotlin_module
|
||||
out/production/module/UseFooFKt.class
|
||||
out/production/module/UseFooGKt.class
|
||||
out/production/module/Utils.class
|
||||
out/production/module/Utils__PartAKt.class
|
||||
out/production/module/Utils__PartCKt.class
|
||||
End of files
|
||||
Compiling files:
|
||||
src/partA.kt
|
||||
src/partC.kt
|
||||
src/useFooF.kt
|
||||
src/useFooG.kt
|
||||
End of files
|
||||
Exit code: OK
|
||||
------------------------------------------
|
||||
+4
@@ -0,0 +1,4 @@
|
||||
@file:JvmName("Utils")
|
||||
@file:JvmMultifileClass
|
||||
|
||||
fun f(x: Any) {}
|
||||
+4
@@ -0,0 +1,4 @@
|
||||
@file:JvmName("Utils")
|
||||
@file:JvmMultifileClass
|
||||
|
||||
fun g(x: Int) {}
|
||||
Vendored
+6
@@ -0,0 +1,6 @@
|
||||
@file:JvmName("Utils")
|
||||
@file:JvmMultifileClass
|
||||
|
||||
fun f(x: Int) {}
|
||||
|
||||
fun g(x: Int?) {}
|
||||
+4
@@ -0,0 +1,4 @@
|
||||
@file:JvmName("Utils")
|
||||
@file:JvmMultifileClass
|
||||
|
||||
fun h(x: Int) {}
|
||||
+3
@@ -0,0 +1,3 @@
|
||||
fun useFooF() {
|
||||
f(10)
|
||||
}
|
||||
+3
@@ -0,0 +1,3 @@
|
||||
fun useFooG() {
|
||||
g(10)
|
||||
}
|
||||
+3
@@ -0,0 +1,3 @@
|
||||
fun useFooH() {
|
||||
h(10)
|
||||
}
|
||||
+9
@@ -0,0 +1,9 @@
|
||||
class A {
|
||||
companion object {
|
||||
@JvmStatic
|
||||
fun f() {}
|
||||
|
||||
@JvmStatic
|
||||
fun g() {}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,5 @@
|
||||
class AA {
|
||||
companion object {
|
||||
fun f() {}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,4 @@
|
||||
@file:JvmName("A")
|
||||
@file:JvmMultifileClass
|
||||
|
||||
fun f() {}
|
||||
@@ -0,0 +1,4 @@
|
||||
@file:JvmName("A")
|
||||
@file:JvmMultifileClass
|
||||
|
||||
fun g() {}
|
||||
+9
@@ -0,0 +1,9 @@
|
||||
class A {
|
||||
companion object {
|
||||
@JvmStatic
|
||||
fun f() {}
|
||||
|
||||
@JvmStatic
|
||||
fun g() {}
|
||||
}
|
||||
}
|
||||
+5
@@ -0,0 +1,5 @@
|
||||
class UseFJava {
|
||||
void doUse() {
|
||||
A.f();
|
||||
}
|
||||
}
|
||||
+38
@@ -0,0 +1,38 @@
|
||||
================ Step #1 =================
|
||||
|
||||
Cleaning output files:
|
||||
out/production/module/A.class
|
||||
out/production/module/A__APartFKt.class
|
||||
out/production/module/META-INF/module.kotlin_module
|
||||
End of files
|
||||
Cleaning output files:
|
||||
out/production/module/A__APartGKt.class
|
||||
End of files
|
||||
Cleaning output files:
|
||||
out/production/module/UseFJava.class
|
||||
out/production/module/UseFKt.class
|
||||
out/production/module/UseGKt.class
|
||||
End of files
|
||||
Compiling files:
|
||||
src/A.kt
|
||||
src/useF.kt
|
||||
src/useG.kt
|
||||
End of files
|
||||
Exit code: ABORT
|
||||
------------------------------------------
|
||||
COMPILATION FAILED
|
||||
Unresolved reference: f
|
||||
Unresolved reference: g
|
||||
|
||||
================ Step #2 =================
|
||||
|
||||
Compiling files:
|
||||
src/A.kt
|
||||
src/useF.kt
|
||||
src/useG.kt
|
||||
End of files
|
||||
Exit code: OK
|
||||
------------------------------------------
|
||||
Compiling files:
|
||||
src/UseFJava.java
|
||||
End of files
|
||||
@@ -0,0 +1,3 @@
|
||||
fun useAA() {
|
||||
AA.f()
|
||||
}
|
||||
@@ -0,0 +1,3 @@
|
||||
fun useF() {
|
||||
f()
|
||||
}
|
||||
+3
@@ -0,0 +1,3 @@
|
||||
fun useF() {
|
||||
A.f()
|
||||
}
|
||||
@@ -0,0 +1,3 @@
|
||||
fun useG() {
|
||||
g()
|
||||
}
|
||||
+3
@@ -0,0 +1,3 @@
|
||||
fun useG() {
|
||||
A.g()
|
||||
}
|
||||
Reference in New Issue
Block a user