Fix source information mapping in PsiSourceManager
Add tests for source information mapping KT-17108 source information corrupted on PSI -> IR transformation
This commit is contained in:
@@ -42,7 +42,7 @@ class PsiSourceManager : SourceManager {
|
||||
|
||||
override fun getLineNumber(offset: Int): Int {
|
||||
val index = lineStartOffsets.binarySearch(offset)
|
||||
return if (index >= 0) index else -index - 1
|
||||
return if (index >= 0) index else -index - 2
|
||||
}
|
||||
|
||||
override fun getColumnNumber(offset: Int): Int {
|
||||
|
||||
Reference in New Issue
Block a user