[FE, IR] Store PsiElement for mismatched annotation's actual target
There is IDE quick fix which suggests to copy mismatched annotation from `expect` to `actual` (see KTIJ-26633). It needs to find `actual` PsiElement where to add annotation. Before previous commit, it was easy - just get source of `Incompatibility.actualSymbol`. After previous commit, the problem might be in value parameter, while `actualSymbol` would contain function symbol. This is solved by adding new field `Incompatibility.actualAnnotationTargetElement`. `SourceElementMarker` introduced, because it's needed to be used in abstract checker. Existing `DeclarationSymbolMarker` doesn't fit because in next PR for this issue annotations set on types will be reported, and types are not declarations. ^KT-60671
This commit is contained in:
committed by
Space Team
parent
5c95f69aef
commit
420dceb7d8
@@ -0,0 +1,11 @@
|
||||
/*
|
||||
* 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.fir
|
||||
|
||||
import org.jetbrains.kotlin.KtSourceElement
|
||||
import org.jetbrains.kotlin.mpp.SourceElementMarker
|
||||
|
||||
class FirSourceElement(val element: KtSourceElement?) : SourceElementMarker
|
||||
Reference in New Issue
Block a user