Fix for KT-6202: Redundant and wrong linenumber after if/else condition

#KT-6202 Fixed
This commit is contained in:
Michael Bogdanov
2014-11-05 17:06:31 +03:00
parent ad6afee53f
commit 8a9977de72
7 changed files with 76 additions and 6 deletions

View File

@@ -0,0 +1,8 @@
fun foo() {
if (0 < 1) {
System.out?.println()
} else {
System.out?.println()
}
}
// 1 LINENUMBER 2

View File

@@ -0,0 +1,6 @@
fun foo() {
if (0 < 1) {
System.out?.println()
}
}
// 1 LINENUMBER 2

View File

@@ -0,0 +1,8 @@
fun foo() {
try {
System.out?.println()
} catch(e: Exception) {
System.out?.println()
}
}
// 1 LINENUMBER 2

View File

@@ -0,0 +1,8 @@
fun foo() {
val p = 1
when (p) {
0 -> System.out?.println()
else -> System.out?.println()
}
}
// 1 LINENUMBER 3