[FIR] Add diagnostic when annotation argument is resolved ambiguously
Annotation arguments that are resolved in COMPILER_REQUIRED_ANNOTATIONS phase are resolved again in ANNOTATION_ARGUMENTS phase. If they resolve to a different symbol, report an error. KT-56177
This commit is contained in:
committed by
Space Team
parent
9dda5e4fcd
commit
2139914061
+12
@@ -251,3 +251,15 @@ class ConeAmbiguouslyResolvedAnnotationFromPlugin(
|
||||
- types stage: $typeFromTypesPhase
|
||||
"""
|
||||
}
|
||||
|
||||
class ConeAmbiguouslyResolvedAnnotationArgument(
|
||||
val symbolFromCompilerPhase: FirBasedSymbol<*>,
|
||||
val symbolFromAnnotationArgumentsPhase: FirBasedSymbol<*>?
|
||||
) : ConeDiagnostic {
|
||||
override val reason: String
|
||||
get() = """
|
||||
Annotation symbol resolved differently on compiler annotation and symbols stages:
|
||||
- compiler annotations: $symbolFromCompilerPhase
|
||||
- compiler arguments stage: $symbolFromAnnotationArgumentsPhase
|
||||
"""
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user