Recompile implicit type usages when class signature is changed

This commit is contained in:
Alexey Tsvetkov
2016-01-21 18:34:38 +03:00
parent 310a995bb1
commit f32ff42ba3
63 changed files with 255 additions and 22 deletions
@@ -0,0 +1 @@
open class A
@@ -0,0 +1 @@
open class B : A()
@@ -0,0 +1 @@
open class B
@@ -0,0 +1 @@
open class B : A()
@@ -0,0 +1 @@
class C : B()
@@ -0,0 +1 @@
class D : A()
@@ -0,0 +1,37 @@
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/C.class
out/production/module/CallUseAWithBKt.class
out/production/module/CallUseAWithCKt.class
out/production/module/GetBKt.class
out/production/module/GetCKt.class
out/production/module/META-INF/module.kotlin_module
End of files
Compiling files:
src/C.kt
src/callUseAWithB.kt
src/callUseAWithC.kt
src/getB.kt
src/getC.kt
End of files
COMPILATION FAILED
Type mismatch: inferred type is B but A was expected
Type mismatch: inferred type is C but A was expected
Cleaning output files:
out/production/module/B.class
End of files
Compiling files:
src/B.kt
src/C.kt
src/callUseAWithB.kt
src/callUseAWithC.kt
src/getB.kt
src/getC.kt
End of files
@@ -0,0 +1,3 @@
fun callUseAWithA() {
useA(getA())
}
@@ -0,0 +1,3 @@
fun callUseAWithB() {
useA(getB())
}
@@ -0,0 +1,3 @@
fun callUseAWithC() {
useA(getC())
}
@@ -0,0 +1,3 @@
fun callUseAWithD() {
useA(getD())
}
@@ -0,0 +1 @@
fun getA() = A()
@@ -0,0 +1 @@
fun getB() = B()
@@ -0,0 +1 @@
fun getC() = C()
@@ -0,0 +1 @@
fun getD() = D()
@@ -0,0 +1 @@
fun useA(a: A) {}