[FE, IR] Check compatibility of annotations set on type usages in expect and actual declarations

This includes checking of annotatins set on:

- value parameter types
- type parameter bound types
- extension functions receiver types
- function return types
- class super types

Fix in `defaultParams_inheritanceByDelegation_positive.kt`
is needed because of problem in resolution of implicit return types
(KT-62064), which leads to crash in annotation checker, because it
expects resolved return type.

MR: KT-MR-12245

^KT-60671 Fixed
This commit is contained in:
Roman Efremov
2023-09-11 13:24:29 +02:00
committed by Space Team
parent cb8529d65b
commit 423f4ca5f0
22 changed files with 314 additions and 41 deletions
@@ -8,6 +8,7 @@ package org.jetbrains.kotlin.fir.types
import org.jetbrains.kotlin.KtSourceElement
import org.jetbrains.kotlin.fir.FirElement
import org.jetbrains.kotlin.fir.expressions.FirAnnotation
import org.jetbrains.kotlin.mpp.TypeRefMarker
import org.jetbrains.kotlin.fir.visitors.*
/*
@@ -15,7 +16,7 @@ import org.jetbrains.kotlin.fir.visitors.*
* DO NOT MODIFY IT MANUALLY
*/
abstract class FirResolvedTypeRef : FirTypeRef() {
abstract class FirResolvedTypeRef : FirTypeRef(), TypeRefMarker {
abstract override val source: KtSourceElement?
abstract override val annotations: List<FirAnnotation>
abstract val type: ConeKotlinType