[FIR] Prohibit referencing type parameters in contracts ...
...if they are not reified or not belong to owner declaration of the contract KT-57911
This commit is contained in:
committed by
Space Team
parent
5a92eb2c67
commit
f8dc8057f0
+10
@@ -220,6 +220,16 @@ sealed class ConeContractDescriptionError : ConeDiagnostic {
|
||||
override val reason: String
|
||||
get() = "$operation operator call is illegal in contract description"
|
||||
}
|
||||
|
||||
class NotSelfTypeParameter(val symbol: FirTypeParameterSymbol) : ConeContractDescriptionError() {
|
||||
override val reason: String
|
||||
get() = "Type parameter ${symbol.name} does not belong to owner of contract"
|
||||
}
|
||||
|
||||
class NotReifiedTypeParameter(val symbol: FirTypeParameterSymbol) : ConeContractDescriptionError() {
|
||||
override val reason: String
|
||||
get() = "Type parameter ${symbol.name} is not reified"
|
||||
}
|
||||
}
|
||||
|
||||
class ConeIllegalAnnotationError(val name: Name) : ConeDiagnostic {
|
||||
|
||||
Reference in New Issue
Block a user