FIR: make ConeVariableExpectedError an object
This commit is contained in:
committed by
TeamCityServer
parent
9b9c51bc8d
commit
1b6fa4303f
+1
-1
@@ -131,7 +131,7 @@ class ConeOperatorAmbiguityError(override val candidateSymbols: Collection<FirBa
|
||||
override val reason: String get() = "Operator overload ambiguity. Compatible candidates: ${candidateSymbols.map { describeSymbol(it) }}"
|
||||
}
|
||||
|
||||
class ConeVariableExpectedError : ConeDiagnostic {
|
||||
object ConeVariableExpectedError : ConeDiagnostic {
|
||||
override val reason: String get() = "Variable expected"
|
||||
}
|
||||
|
||||
|
||||
+1
-1
@@ -528,7 +528,7 @@ open class FirExpressionsResolveTransformer(transformer: FirBodyResolveTransform
|
||||
leftArgument.calleeReference.source
|
||||
else -> leftArgument.source
|
||||
}
|
||||
diagnostic = if (lhsSymbol == null) ConeVariableExpectedError() else ConeValReassignmentError(lhsSymbol)
|
||||
diagnostic = if (lhsSymbol == null) ConeVariableExpectedError else ConeValReassignmentError(lhsSymbol)
|
||||
}
|
||||
}
|
||||
(leftArgument as? FirQualifiedAccess)?.let {
|
||||
|
||||
Reference in New Issue
Block a user