Simplify resolve for control labels by using PSI

Diagnostic `NOT_A_RETURN_LABEL` wasn't quite useful and its eliminating allows to simplify label resolver a lot. It could be also added using PSI
This commit is contained in:
Mikhail Zarechenskiy
2017-04-17 16:02:49 +03:00
parent e79a7d3e94
commit f3ed75998e
5 changed files with 6 additions and 33 deletions
+2 -2
View File
@@ -6,10 +6,10 @@ class A {
if (1 < 2)
return@inner
else
<!RETURN_NOT_ALLOWED!>return@outer<!>
<!RETURN_NOT_ALLOWED!>return@outer<!>
}
if (1 < 2)
<!NOT_A_RETURN_LABEL!>return@A<!>
return<!UNRESOLVED_REFERENCE!>@A<!>
else if (2 < 3)
return<!UNRESOLVED_REFERENCE!>@inner<!>
return@outer