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
@@ -0,0 +1,21 @@
package
public fun testAnnotatedLambdaLabel(): () -> kotlin.Unit
public fun testAnonymousFunctionLabel(): () -> kotlin.Unit
public fun testAnonymousObjectLabel(): kotlin.Any
public fun testDoWhileLoopLabel(): kotlin.Unit
public fun testForLoopLabel(/*0*/ xs: kotlin.collections.List<kotlin.Any>): kotlin.Unit
public fun testHighOrderFunctionCallLabel(): kotlin.Unit
public fun testLabelBoundToInvokeOperatorExpression(): kotlin.Int
public fun testLabelBoundToLambda(): kotlin.Int
public fun testLambdaLabel(): () -> kotlin.Int
public fun testParenthesizedLambdaLabel(): () -> kotlin.Unit
public fun testValLabel(): kotlin.Unit
public fun testWhileLoopLabel(): kotlin.Unit
@kotlin.annotation.Target(allowedTargets = {AnnotationTarget.EXPRESSION}) @kotlin.annotation.Retention(value = AnnotationRetention.SOURCE) public final annotation class Ann : kotlin.Annotation {
public constructor Ann()
public open override /*1*/ /*fake_override*/ fun equals(/*0*/ other: kotlin.Any?): kotlin.Boolean
public open override /*1*/ /*fake_override*/ fun hashCode(): kotlin.Int
public open override /*1*/ /*fake_override*/ fun toString(): kotlin.String
}