[FIR] Get FirSession from declaration in ReturnTypeCalculatorWithJump
If the session is from the other module, it might not know about FirFiles which are relevant for transforming and resolving the declaration ^KT-52136 Fixed
This commit is contained in:
+30
@@ -0,0 +1,30 @@
|
||||
Module: lib
|
||||
FILE: module_lib_implicitTypeFromOtherModule.kt
|
||||
package dependency
|
||||
|
||||
public final class Other : R|kotlin/Any| {
|
||||
public constructor(): R|dependency/Other| {
|
||||
super<R|kotlin/Any|>()
|
||||
}
|
||||
|
||||
}
|
||||
public final class Lib : R|kotlin/Any| {
|
||||
public constructor(): R|dependency/Lib| {
|
||||
super<R|kotlin/Any|>()
|
||||
}
|
||||
|
||||
}
|
||||
public final fun test(): R|dependency/Lib| {
|
||||
^test R|dependency/Lib.Lib|()
|
||||
}
|
||||
Module: main
|
||||
FILE: module_main_implicitTypeFromOtherModule.kt
|
||||
package main
|
||||
|
||||
public final fun usage(): R|kotlin/Unit| {
|
||||
R|main/take|(R|dependency/test|())
|
||||
}
|
||||
public final fun take(a: R|dependency/Lib|): R|kotlin/Unit| {
|
||||
}
|
||||
public final fun take(a: R|dependency/Other|): R|kotlin/Unit| {
|
||||
}
|
||||
@@ -0,0 +1,27 @@
|
||||
// SKIP_JAVAC
|
||||
// This directive is needed to skip this test in LazyBodyIsNotTouchedTilContractsPhaseTestGenerated,
|
||||
// because it fails to parse module structure of multimodule test
|
||||
|
||||
// MODULE: lib
|
||||
package dependency
|
||||
|
||||
class Other
|
||||
|
||||
class Lib
|
||||
|
||||
fun test() = Lib()
|
||||
|
||||
// MODULE: main(lib)
|
||||
package main
|
||||
|
||||
import dependency.test
|
||||
import dependency.Lib
|
||||
import dependency.Other
|
||||
|
||||
fun usage() {
|
||||
take(test())
|
||||
}
|
||||
|
||||
fun take(a: Lib) {}
|
||||
|
||||
fun take(a: Other) {}
|
||||
Reference in New Issue
Block a user