Tests: do not add transitive dependencies in multi-module tests

Prefer to have all module dependencies, including dependencies on
stdlib/reflect, declared explicitly. This allows to have tests on
situations like the one in KT-45308: three modules A<-B<-C, where C
doesn't depend on A, which was compiling correctly with the old JVM
backend before 1.5, but started to fail with JVM IR in 1.5.

Also simplify the code a bit, remove duplicated logic.
This commit is contained in:
Alexander Udalov
2021-05-19 21:50:57 +02:00
parent eac3f507b6
commit 8dee36d420
6 changed files with 25 additions and 59 deletions
@@ -11,6 +11,7 @@ class FqName(val s: String)
val VOLATILE_ANNOTATION_FQ_NAME = FqName("volatile")
// MODULE: main(lib)
// WITH_RUNTIME
// FILE: B.kt
import first.second.VOLATILE_ANNOTATION_FQ_NAME