[FIR] Forbid multiple labels per statement
^KT-53629: Fixed
This commit is contained in:
committed by
Space Team
parent
cd5b38b958
commit
d27adf6677
@@ -27,6 +27,10 @@ class ConeUnderscoreIsReserved(source: KtSourceElement) : ConeDiagnosticWithSour
|
||||
override val reason: String get() = "Names _, __, ___, ..., are reserved in Kotlin"
|
||||
}
|
||||
|
||||
class ConeMultipleLabelsAreForbidden(source: KtSourceElement) : ConeDiagnosticWithSource(source) {
|
||||
override val reason: String get() = "Multiple labels per statement are forbidden"
|
||||
}
|
||||
|
||||
class ConeCannotInferTypeParameterType(
|
||||
val typeParameter: FirTypeParameterSymbol,
|
||||
override val reason: String = "Cannot infer type for parameter ${typeParameter.name}"
|
||||
|
||||
@@ -102,7 +102,7 @@ fun <T : FirStatement> FirBlock.replaceFirstStatement(factory: (T) -> FirStateme
|
||||
}
|
||||
|
||||
fun FirExpression.unwrapErrorExpression(): FirExpression? =
|
||||
if (this is FirErrorExpression) expression?.run { unwrapErrorExpression() } else this
|
||||
if (this is FirErrorExpression) expression?.unwrapErrorExpression() else this
|
||||
|
||||
fun FirExpression.unwrapArgument(): FirExpression = (this as? FirWrappedArgumentExpression)?.expression ?: this
|
||||
|
||||
|
||||
Reference in New Issue
Block a user