-
Notifications
You must be signed in to change notification settings - Fork 5.8k
Commit
In deeply nested cases of a try-finally within a lambda, local var initialization checks can report false positives due to the recent capture-by-value changes meant for local val initialization checks. ^KT-70133 Fixed
- Loading branch information
There are no files selected for viewing
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,43 @@ | ||
// FIR_IDENTICAL | ||
fun invokeLater(x: () -> Unit) { | ||
x() | ||
} | ||
|
||
fun nestedFinallyAndLambda1() { | ||
var x: String | ||
invokeLater { | ||
x = "" | ||
invokeLater { | ||
try { | ||
} finally { | ||
x.length | ||
} | ||
} | ||
} | ||
} | ||
|
||
fun nestedFinallyAndLambda2() { | ||
var x: String | ||
invokeLater { | ||
x = "" | ||
try { | ||
} finally { | ||
invokeLater { | ||
x.length | ||
} | ||
} | ||
} | ||
} | ||
|
||
fun nestedFinallyAndLambda3() { | ||
var x: String | ||
try { | ||
} finally { | ||
invokeLater { | ||
x = "" | ||
invokeLater { | ||
x.length | ||
} | ||
} | ||
} | ||
} |
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.