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:
Dmitry Petrov
2017-03-28 14:40:35 +03:00
parent 4086a84622
commit 2a97fb17ba
9 changed files with 218 additions and 6 deletions
@@ -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 {