Report RETURN_NOT_ALLOWED and RETURN_IN_FUNCTION_WITH_EXPRESSION_BODY only on the return with label (KT-13340)
#KT-13340 Fixed
This commit is contained in:
@@ -12,9 +12,9 @@ fun test() {
|
||||
doSmth(if (true) 3 else return, <!TOO_MANY_ARGUMENTS!>1<!>)
|
||||
}
|
||||
|
||||
val a : Nothing = <!RETURN_NOT_ALLOWED!>return 1<!>
|
||||
val a : Nothing = <!RETURN_NOT_ALLOWED!>return<!> 1
|
||||
|
||||
val b = <!RETURN_NOT_ALLOWED!>return 1<!>
|
||||
val b = <!RETURN_NOT_ALLOWED!>return<!> 1
|
||||
|
||||
val c = doSmth(if (true) 3 else <!RETURN_NOT_ALLOWED!>return<!>)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user