Light classes: Fix getTextOffset() for identifiers

Before this commit, getTextOffset() and getTextRange() implementations were inconsistent.
This commit is contained in:
Yan Zhulanow
2019-07-03 17:10:56 +09:00
parent 0f4085066f
commit 7078302e6c
2 changed files with 40 additions and 0 deletions
@@ -46,4 +46,5 @@ open class KtLightIdentifier(
override fun getParent() = lightOwner
override fun getContainingFile() = lightOwner.containingFile
override fun getTextRange() = origin?.textRange ?: TextRange.EMPTY_RANGE
override fun getTextOffset(): Int = origin?.textOffset ?: -1
}