KT-22274 report warning on labels that can't be referenced

Labels are meaningful only if they can be referenced by 'break',
'continue', or 'return' expressions.
This commit is contained in:
Dmitry Petrov
2018-07-24 15:58:10 +03:00
parent 6fb913a463
commit df6d4f358a
28 changed files with 127 additions and 42 deletions
+2 -2
View File
@@ -5,8 +5,8 @@
annotation class yield
fun bar(p: Int) {
<!YIELD_IS_RESERVED!>yield<!>@ p
`yield`@ p
<!REDUNDANT_LABEL_WARNING!><!YIELD_IS_RESERVED!>yield<!>@<!> p
<!REDUNDANT_LABEL_WARNING!>`yield`@<!> p
@<!YIELD_IS_RESERVED!>yield<!>() p
@`yield`() p