[FIR] Implement FirReturnAllowedChecker
Supported diagnostics: - RETURN_NOT_ALLOWED - RETURN_IN_FUNCTION_WITH_EXPRESSION_BODY
This commit is contained in:
committed by
TeamCityServer
parent
254ff77977
commit
3cb17ac2f0
@@ -1,11 +0,0 @@
|
||||
fun nonlocals(b : Boolean) {
|
||||
a@{
|
||||
fun foo() {
|
||||
if (b) {
|
||||
return@a 1 // The label must be resolved, but an error should be reported for a non-local return
|
||||
}
|
||||
}
|
||||
|
||||
return@a 5
|
||||
}
|
||||
}
|
||||
@@ -1,3 +1,4 @@
|
||||
// FIR_IDENTICAL
|
||||
fun nonlocals(b : Boolean) {
|
||||
a@{
|
||||
fun foo() {
|
||||
|
||||
Reference in New Issue
Block a user