Recompile inline function usages in JS when offset is changed
Otherwise source maps would differ after rebuild
This commit is contained in:
+10
-1
@@ -120,7 +120,16 @@ fun TranslationContext.wrapWithInlineMetadata(
|
||||
else -> descriptor.fqNameSafe.asString()
|
||||
}
|
||||
|
||||
processInlineFunction(file, fqName, functionWithMetadata)
|
||||
val offset = sourceInfo?.node?.startOffset
|
||||
val document = psiFile.viewProvider.document
|
||||
var sourceLine = -1
|
||||
var sourceColumn = -1
|
||||
if (offset != null && document != null) {
|
||||
sourceLine = document.getLineNumber(offset)
|
||||
sourceColumn = offset - document.getLineStartOffset(sourceLine)
|
||||
}
|
||||
|
||||
processInlineFunction(file, fqName, functionWithMetadata, sourceLine, sourceColumn)
|
||||
}
|
||||
|
||||
functionWithMetadata
|
||||
|
||||
Reference in New Issue
Block a user