[JS IR] Fix the instability of LoweredDeclarationSignature
A suspend stub for the abstract function may be created in the context of the child function. If on an incremental rebuild the stub is created from the parent context (e.g. a file with the child is not modified), the resulting LoweredDeclarationSignature will be different. It will lead to a broken cross-module reference and broken JS code. Therefore it is required to wrap the creation routine into StageController::restrictTo() explicitly. ^KT-54934 Fixed
This commit is contained in:
committed by
Space Team
parent
fb38ab3cbb
commit
f7063555ca
Vendored
+16
@@ -0,0 +1,16 @@
|
||||
internal suspend fun testDefaltParam(stepId: Int): Int {
|
||||
return callFun(ClassA2())
|
||||
}
|
||||
|
||||
private suspend fun ignoreIt() = ClassA1()
|
||||
|
||||
private suspend fun callFun(a: InterfaceA): Int {
|
||||
return a.functionA(0, "", false)
|
||||
}
|
||||
|
||||
suspend fun box(stepId: Int): String {
|
||||
if (testDefaltParam(stepId) != stepId) {
|
||||
return "Fail"
|
||||
}
|
||||
return "OK"
|
||||
}
|
||||
+5
@@ -0,0 +1,5 @@
|
||||
STEP 0:
|
||||
dependencies: lib1, lib2
|
||||
added file: m.kt
|
||||
STEP 1:
|
||||
dependencies: lib1, lib2
|
||||
Reference in New Issue
Block a user