[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
@@ -0,0 +1,17 @@
/*
* Copyright 2010-2023 JetBrains s.r.o. and Kotlin Programming Language contributors.
* Use of this source code is governed by the Apache 2.0 license that can be found in the license/LICENSE.txt file.
*/
package org.jetbrains.kotlin.mpp
import org.jetbrains.kotlin.name.ClassId
/**
* Common interface for type references to be used in abstract checker.
* The idea is similar to [org.jetbrains.kotlin.types.model.KotlinTypeMarker],
* but type reference, unlike a type, has source element.
*
* Used in [org.jetbrains.kotlin.resolve.calls.mpp.AbstractExpectActualAnnotationMatchChecker].
*/
interface TypeRefMarker