Fix module re-importing when inlining functions in JS BE
When inliner reads function's body from other module, it performs substitution _ -> moduleAlias. However, local alias can't be used for this purpose, since call site can be in public inline function itself, so the correct substitution would be -> _.$$imports$$.alias
This commit is contained in:
@@ -194,7 +194,7 @@ class FunctionReader(
|
||||
|
||||
val position = info.offsetToSourceMapping[offset]
|
||||
val function = parseFunction(source, info.filePath, position, offset, ThrowExceptionOnErrorReporter, JsRootScope(JsProgram()))
|
||||
val moduleReference = moduleNameMap[tag] ?: currentModuleName.makeRef()
|
||||
val moduleReference = moduleNameMap[tag]?.deepCopy() ?: currentModuleName.makeRef()
|
||||
|
||||
val sourceMap = info.sourceMap
|
||||
if (sourceMap != null) {
|
||||
|
||||
Reference in New Issue
Block a user