[FIR] Fix disappeared REPEATED_ANNOTATION for dynamic types
https://youtrack.jetbrains.com/issue/KT-59916/K2-Disappeared-REPEATEDANNOTATION FirAnnotationChecker does not detect repeated annotation on dynamic type, since FirTypeResolverImpl wrongly did not convert source annotations to attributes of ConeDynamicType. This MR improves FirTypeResolverImpl to convert attributes of FirDynamicTypeRef to annotations and attach them to ConeDynamicType. Merge-request: KT-MR-12551 Merged-by: Vladimir Sukharev <Vladimir.Sukharev@jetbrains.com>
This commit is contained in:
committed by
Space Team
parent
22a01432df
commit
242c1cf5f0
+14
@@ -0,0 +1,14 @@
|
||||
// FIR_IDENTICAL
|
||||
@Target(AnnotationTarget.TYPE)
|
||||
annotation class Ann1
|
||||
|
||||
@Target(AnnotationTarget.TYPE)
|
||||
annotation class Ann2
|
||||
|
||||
abstract class AnnGenList<T> : List<@Ann1 T> {}
|
||||
typealias TestAnnGen1 = AnnGenList<String>
|
||||
typealias TestAnnGen2 = AnnGenList<@Ann2 String>
|
||||
typealias TestAnnGen3 = AnnGenList<@Ann1 String> // KT-62602: should REPEATED_ANNOTATION diagnostic be raised here?
|
||||
|
||||
fun useAnnGen1(x: TestAnnGen1) = x
|
||||
fun useAnnGen2(x: TestAnnGen2) = x
|
||||
Reference in New Issue
Block a user