[FIR] Add attributes to ConeErrorType for correct annotations resolving
This commit is contained in:
@@ -39,7 +39,11 @@ sealed class ConeSimpleKotlinType : ConeKotlinType(), SimpleTypeMarker
|
|||||||
|
|
||||||
class ConeClassLikeErrorLookupTag(override val classId: ClassId) : ConeClassLikeLookupTag()
|
class ConeClassLikeErrorLookupTag(override val classId: ClassId) : ConeClassLikeLookupTag()
|
||||||
|
|
||||||
class ConeErrorType(val diagnostic: ConeDiagnostic, val isUninferredParameter: Boolean = false) : ConeClassLikeType() {
|
class ConeErrorType(
|
||||||
|
val diagnostic: ConeDiagnostic,
|
||||||
|
val isUninferredParameter: Boolean = false,
|
||||||
|
override val attributes: ConeAttributes = ConeAttributes.Empty
|
||||||
|
) : ConeClassLikeType() {
|
||||||
override val lookupTag: ConeClassLikeLookupTag
|
override val lookupTag: ConeClassLikeLookupTag
|
||||||
get() = ConeClassLikeErrorLookupTag(ClassId.fromString("<error>"))
|
get() = ConeClassLikeErrorLookupTag(ClassId.fromString("<error>"))
|
||||||
|
|
||||||
@@ -49,9 +53,6 @@ class ConeErrorType(val diagnostic: ConeDiagnostic, val isUninferredParameter: B
|
|||||||
override val nullability: ConeNullability
|
override val nullability: ConeNullability
|
||||||
get() = ConeNullability.UNKNOWN
|
get() = ConeNullability.UNKNOWN
|
||||||
|
|
||||||
override val attributes: ConeAttributes
|
|
||||||
get() = ConeAttributes.Empty
|
|
||||||
|
|
||||||
override fun equals(other: Any?) = this === other
|
override fun equals(other: Any?) = this === other
|
||||||
override fun hashCode(): Int = System.identityHashCode(this)
|
override fun hashCode(): Int = System.identityHashCode(this)
|
||||||
}
|
}
|
||||||
|
|||||||
+1
-1
@@ -253,7 +253,7 @@ class FirTypeResolverImpl(private val session: FirSession) : FirTypeResolver() {
|
|||||||
ConeUnresolvedQualifierError(typeRef.render())
|
ConeUnresolvedQualifierError(typeRef.render())
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return ConeErrorType(diagnostic)
|
return ConeErrorType(diagnostic, attributes = typeRef.annotations.computeTypeAttributes(session))
|
||||||
}
|
}
|
||||||
if (symbol is FirTypeParameterSymbol) {
|
if (symbol is FirTypeParameterSymbol) {
|
||||||
for (part in typeRef.qualifier) {
|
for (part in typeRef.qualifier) {
|
||||||
|
|||||||
Reference in New Issue
Block a user