FIR LT: Fix diagnostic location calculation on the last line
it was calculated incorrectly on the last line that do not end with EOL. #KT-56649 fixed
This commit is contained in:
committed by
Space Team
parent
d120d83d60
commit
e39eb62e6e
@@ -0,0 +1,6 @@
|
||||
$TESTDATA_DIR$/firErrorOnLastLine.kt
|
||||
-language-version
|
||||
2.0
|
||||
-Xuse-fir-lt=true
|
||||
-d
|
||||
$TEMP_DIR$
|
||||
@@ -0,0 +1,2 @@
|
||||
val x = this
|
||||
val y = this // EOL AFTER THIS LINE!
|
||||
@@ -0,0 +1,8 @@
|
||||
warning: language version 2.0 is experimental, there are no backwards compatibility guarantees for new language and library features
|
||||
compiler/testData/cli/jvm/firErrorOnLastLine.kt:1:9: error: 'this' is not defined in this context
|
||||
val x = this
|
||||
^
|
||||
compiler/testData/cli/jvm/firErrorOnLastLine.kt:2:9: error: 'this' is not defined in this context
|
||||
val y = this // EOL AFTER THIS LINE!
|
||||
^
|
||||
COMPILATION_ERROR
|
||||
@@ -0,0 +1,6 @@
|
||||
$TESTDATA_DIR$/firErrorOnLastLineNoEol.kt
|
||||
-language-version
|
||||
2.0
|
||||
-Xuse-fir-lt=true
|
||||
-d
|
||||
$TEMP_DIR$
|
||||
@@ -0,0 +1,2 @@
|
||||
val x = this
|
||||
val y = this // *NO* EOL AFTER THIS LINE!
|
||||
@@ -0,0 +1,8 @@
|
||||
warning: language version 2.0 is experimental, there are no backwards compatibility guarantees for new language and library features
|
||||
compiler/testData/cli/jvm/firErrorOnLastLineNoEol.kt:1:9: error: 'this' is not defined in this context
|
||||
val x = this
|
||||
^
|
||||
compiler/testData/cli/jvm/firErrorOnLastLineNoEol.kt:2:9: error: 'this' is not defined in this context
|
||||
val y = this // *NO* EOL AFTER THIS LINE!
|
||||
^
|
||||
COMPILATION_ERROR
|
||||
@@ -0,0 +1,5 @@
|
||||
$TESTDATA_DIR$/firSyntaxError.kt
|
||||
-language-version
|
||||
2.0
|
||||
-d
|
||||
$TEMP_DIR$
|
||||
+1
@@ -0,0 +1 @@
|
||||
fun a() {
|
||||
@@ -0,0 +1,5 @@
|
||||
warning: language version 2.0 is experimental, there are no backwards compatibility guarantees for new language and library features
|
||||
compiler/testData/cli/jvm/firSyntaxError.kt:1:10: error: syntax error
|
||||
fun a() {
|
||||
^
|
||||
COMPILATION_ERROR
|
||||
Reference in New Issue
Block a user