IC: take into account added and removed classes when calculate affected names

This commit is contained in:
Zalim Bashorov
2016-03-24 20:59:30 +03:00
parent 1b2deb8a8a
commit 51c6abdbed
142 changed files with 1692 additions and 30 deletions
@@ -0,0 +1,5 @@
package foo
open class A {
fun foo() {}
}
@@ -0,0 +1,5 @@
package foo
open class B : A() {
fun bar() {}
}
@@ -0,0 +1,5 @@
package foo
open class B {
fun bar() {}
}
@@ -0,0 +1,5 @@
package foo
class C : B() {
fun baz() {}
}
@@ -0,0 +1,63 @@
================ Step #1 =================
Cleaning output files:
out/production/module/foo/A.class
End of files
Compiling files:
End of files
Marked as dirty by Kotlin:
src/B.kt
src/createA.kt
src/useAfoo.kt
Exit code: ADDITIONAL_PASS_REQUIRED
------------------------------------------
Cleaning output files:
out/production/module/META-INF/module.kotlin_module
out/production/module/foo/B.class
out/production/module/use/CreateAKt.class
out/production/module/use/UseAfooKt.class
End of files
Compiling files:
src/B.kt
src/createA.kt
src/useAfoo.kt
End of files
Exit code: ABORT
------------------------------------------
COMPILATION FAILED
Unresolved reference: A
Unresolved reference: A
================ Step #2 =================
Compiling files:
src/B.kt
src/createA.kt
src/funA.kt
src/useAfoo.kt
End of files
Marked as dirty by Kotlin:
src/C.kt
src/createB.kt
src/createC.kt
src/useBbar.kt
src/useCbaz.kt
Exit code: ADDITIONAL_PASS_REQUIRED
------------------------------------------
Cleaning output files:
out/production/module/META-INF/module.kotlin_module
out/production/module/foo/C.class
out/production/module/use/CreateBKt.class
out/production/module/use/CreateCKt.class
out/production/module/use/UseBbarKt.class
out/production/module/use/UseCbazKt.class
End of files
Compiling files:
src/C.kt
src/createB.kt
src/createC.kt
src/useBbar.kt
src/useCbaz.kt
End of files
Exit code: OK
------------------------------------------
@@ -0,0 +1,5 @@
package use
import foo.*
fun createA() = A()
@@ -0,0 +1,5 @@
package use
import foo.*
fun createB() = B()
@@ -0,0 +1,5 @@
package use
import foo.*
fun createC() = C()
@@ -0,0 +1,7 @@
package foo
fun A(a: Int = 1) = AnotherA()
class AnotherA {
fun foo() {}
}
@@ -0,0 +1,3 @@
package other
fun f() {}
@@ -0,0 +1,7 @@
package use
import foo.*
fun useAfoo() {
createA().foo()
}
@@ -0,0 +1,7 @@
package use
import foo.*
fun useBbar() {
createB().bar()
}
@@ -0,0 +1,7 @@
package use
import foo.*
fun useCbaz() {
createC().baz()
}