IR: fix offsets in constant folding lowering
This commit is contained in:
committed by
TeamCityServer
parent
9d1a8b2d58
commit
1006eb0945
+2
-1
@@ -273,7 +273,8 @@ class FoldConstantLowering(
|
||||
next.startOffset, next.endOffset, context.irBuiltIns.stringType, constToString(next)
|
||||
)
|
||||
else -> folded[folded.size - 1] = IrConstImpl.string(
|
||||
last.startOffset, next.endOffset, context.irBuiltIns.stringType,
|
||||
// Inlined strings may have `last.startOffset > next.endOffset`
|
||||
Math.min(last.startOffset, next.startOffset), Math.max(last.endOffset, next.endOffset), context.irBuiltIns.stringType,
|
||||
constToString(last) + constToString(next)
|
||||
)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user