[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
@@ -12,11 +12,11 @@ fun test() {
|
||||
doSmth(if (true) 3 else return, <!TOO_MANY_ARGUMENTS!>1<!>)
|
||||
}
|
||||
|
||||
val a : Nothing = return 1
|
||||
val a : Nothing = <!RETURN_NOT_ALLOWED!>return<!> 1
|
||||
|
||||
val b = return 1
|
||||
val b = <!RETURN_NOT_ALLOWED!>return<!> 1
|
||||
|
||||
val c = doSmth(if (true) 3 else return)
|
||||
val c = doSmth(if (true) 3 else <!RETURN_NOT_ALLOWED!>return<!>)
|
||||
|
||||
|
||||
fun f(mi: Int = if (true) 0 else return) {}
|
||||
|
||||
Reference in New Issue
Block a user