Skip to content
This repository was archived by the owner on Jun 3, 2025. It is now read-only.

Conversation

@bnorm
Copy link
Owner

@bnorm bnorm commented Sep 15, 2020

Fixes #20

The Kotlin compiler removes carriage returns from the text of the file
when calculating the startOffset and endOffset properties for an
IrExpression. This causes the source snippet extraction to not work for
files with Windows-style line-separators.

Before pull substrings out of the file source string, remove all
carriages returns so the IrExpression offsets match the compiler.

The Kotlin compiler removes carriage returns from the text of the file
when calculating the startOffset and endOffset properties for an
IrExpression. This causes the source snippet extraction to not work for
files with Windows-style line-separators.

Before pull substrings out of the file source string, remove all
carriages returns so the IrExpression offsets match the compiler.
@bnorm bnorm merged commit 89f1d5c into master Sep 15, 2020
@bnorm bnorm deleted the crlf branch September 15, 2020 01:05
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

StringIndexOutOfBoundsException in IrStackVariableKt.buildMessage

2 participants