Allow to process return statements without parent KtDeclaration (EA-70883)

This commit is contained in:
Nikolay Krasko
2016-02-05 15:08:06 +03:00
committed by Nikolay Krasko
parent 1e50847985
commit 938a435346
6 changed files with 20 additions and 1 deletions
@@ -0,0 +1,4 @@
fun foo(): Int? {
val a: Int? = 1
<caret>return a
}
@@ -0,0 +1 @@
<error descr="[RETURN_NOT_ALLOWED] 'return' is not allowed here">return a</error>