c53d91bae1
Do not generate linenumber for the start of the finally block, because that is usually where the only word 'finally' is located. Instead, generate linenumber for the first expression inside the finally block. Not generating this linenumber fixes an issue in code coverage tools which would consider such finally uncovered. Although this might be technically considered as designed, it makes more sense to NOT detect it as uncovered because semantics of the finally block shouldn't really differ whether it's executed normally or because an exception happened. It's also beneficial for the tool support to behave like javac, which doesn't generate the linenumber either. #KT-50973 Fixed
11 lines
147 B
Kotlin
Vendored
11 lines
147 B
Kotlin
Vendored
fun foo() {
|
|
try {
|
|
System.out.println("A")
|
|
} finally {
|
|
System.out.println("B")
|
|
}
|
|
}
|
|
|
|
// 0 LINENUMBER 4
|
|
// 2 LINENUMBER 5
|