mirror of
https://github.com/jlengrand/kotlin.git
synced 2026-05-08 15:53:19 +00:00
Fix for KT-6202: Redundant and wrong linenumber after if/else condition
#KT-6202 Fixed
This commit is contained in:
@@ -0,0 +1,8 @@
|
||||
fun foo() {
|
||||
if (0 < 1) {
|
||||
System.out?.println()
|
||||
} else {
|
||||
System.out?.println()
|
||||
}
|
||||
}
|
||||
// 1 LINENUMBER 2
|
||||
@@ -0,0 +1,6 @@
|
||||
fun foo() {
|
||||
if (0 < 1) {
|
||||
System.out?.println()
|
||||
}
|
||||
}
|
||||
// 1 LINENUMBER 2
|
||||
@@ -0,0 +1,8 @@
|
||||
fun foo() {
|
||||
try {
|
||||
System.out?.println()
|
||||
} catch(e: Exception) {
|
||||
System.out?.println()
|
||||
}
|
||||
}
|
||||
// 1 LINENUMBER 2
|
||||
@@ -0,0 +1,8 @@
|
||||
fun foo() {
|
||||
val p = 1
|
||||
when (p) {
|
||||
0 -> System.out?.println()
|
||||
else -> System.out?.println()
|
||||
}
|
||||
}
|
||||
// 1 LINENUMBER 3
|
||||
Reference in New Issue
Block a user