FIR IDE: pass candidate super types for AMBIGUOUS_SUPER
This way the IDE quickfix do not need to do resolution again to figure out what super type to offer in the quickfix.
This commit is contained in:
committed by
Ilya Kirillov
parent
7c3706dd3f
commit
bdc71a3281
@@ -6,6 +6,7 @@
|
||||
package org.jetbrains.kotlin.fir.diagnostics
|
||||
|
||||
import org.jetbrains.kotlin.fir.FirSourceElement
|
||||
import org.jetbrains.kotlin.fir.types.ConeKotlinType
|
||||
|
||||
class ConeSimpleDiagnostic(override val reason: String, val kind: DiagnosticKind = DiagnosticKind.Other) : ConeDiagnostic
|
||||
|
||||
@@ -23,6 +24,11 @@ class ConeUnderscoreUsageWithoutBackticks(source: FirSourceElement) : ConeDiagno
|
||||
override val reason: String get() = "Names _, __, ___, ... can be used only in back-ticks (`_`, `__`, `___`, ...)"
|
||||
}
|
||||
|
||||
class ConeAmbiguousSuper(val candidateTypes: List<ConeKotlinType>) : ConeDiagnostic {
|
||||
override val reason: String
|
||||
get() = "Ambiguous supertype"
|
||||
}
|
||||
|
||||
enum class DiagnosticKind {
|
||||
Syntax,
|
||||
ExpressionExpected,
|
||||
@@ -49,7 +55,6 @@ enum class DiagnosticKind {
|
||||
MissingStdlibClass,
|
||||
NotASupertype,
|
||||
SuperNotAvailable,
|
||||
AmbiguousSuper,
|
||||
|
||||
LoopInSupertype,
|
||||
RecursiveTypealiasExpansion,
|
||||
|
||||
Reference in New Issue
Block a user