[LL API] return FirErrorProperty for top level destructuring declaration
KTIJ-23552
This commit is contained in:
@@ -6,9 +6,7 @@
|
||||
package org.jetbrains.kotlin.fir.diagnostics
|
||||
|
||||
import org.jetbrains.kotlin.KtSourceElement
|
||||
import org.jetbrains.kotlin.fir.declarations.FirTypeParameter
|
||||
import org.jetbrains.kotlin.fir.symbols.impl.FirTypeParameterSymbol
|
||||
import org.jetbrains.kotlin.fir.symbols.impl.FirValueParameterSymbol
|
||||
import org.jetbrains.kotlin.fir.types.ConeKotlinType
|
||||
import org.jetbrains.kotlin.name.Name
|
||||
|
||||
@@ -43,6 +41,11 @@ class ConeRecursiveTypeParameterDuringErasureError(val typeParameterName: Name)
|
||||
get() = "self-recursive type parameter $typeParameterName"
|
||||
}
|
||||
|
||||
object ConeDestructuringDeclarationsOnTopLevel : ConeDiagnostic {
|
||||
override val reason: String
|
||||
get() = "Destructuring declarations are only allowed for local variables/values"
|
||||
}
|
||||
|
||||
enum class DiagnosticKind {
|
||||
Syntax,
|
||||
ExpressionExpected,
|
||||
|
||||
Reference in New Issue
Block a user