Files
kotlin-fork/analysis/analysis-api/testData/components/compilerFacility/compilationMultiBinaryModule/dependencyBetweenBinaryLibraries.kt
T
Jaebaek Seo 512efb9649 K2: Support binary library dependencies between test modules
The test infrastructure for analysis supports binary module tests, but
the binary build does not use another binary module as a dependency when
it passes the class path. As a result, each binary module build does not
work when they have dependency on each other.

This commit fixes the issue by
1. Topological sort in the order of dependency graph for test modules.
2. Pass module paths as extra class paths when they have dependency on
   each other.

^KT-64994
2024-02-25 10:10:43 +00:00

16 lines
239 B
Kotlin
Vendored

// MODULE: lib
// FILE: p3/foo.kt
package p3;
fun foo() = 3
// MODULE: lib2(lib)
// FILE: p2/bar.kt
package p2;
fun bar() = 4 + p3.foo()
// MODULE: main(lib, lib2)
// MODULE_KIND: Source
// FILE: main.kt
import p2.bar
fun test() = bar()