K2: drop obsolete TODO about multiple WasExperimental
In certain situations like constructor calls, it's possible to have different WasExperimental/SinceKotlin pairs associated with one use-site, e.g. a constructor call is associated both with a constructor declaration and a class declaration. However, looks like it make no sense to handle this situation in FirSinceKotlinHelpers, because FirOptInUsageBaseChecker already handles them. #KT-59825 Fixed
This commit is contained in:
committed by
Space Team
parent
4d49bdb8ca
commit
a2dc4f155f
+52
@@ -0,0 +1,52 @@
|
||||
// API_VERSION: 1.8
|
||||
// !DIAGNOSTICS: -INVISIBLE_MEMBER -INVISIBLE_REFERENCE
|
||||
|
||||
@RequiresOptIn
|
||||
@Retention(AnnotationRetention.BINARY)
|
||||
annotation class ClassMarker
|
||||
|
||||
@RequiresOptIn
|
||||
@Retention(AnnotationRetention.BINARY)
|
||||
annotation class ConstructorMarker
|
||||
|
||||
@RequiresOptIn
|
||||
@Retention(AnnotationRetention.BINARY)
|
||||
annotation class TypeAliasMarker
|
||||
|
||||
@SinceKotlin("1.9")
|
||||
@WasExperimental(ClassMarker::class)
|
||||
class C {
|
||||
@SinceKotlin("1.9")
|
||||
@WasExperimental(ConstructorMarker::class)
|
||||
constructor() {}
|
||||
}
|
||||
|
||||
@SinceKotlin("1.9")
|
||||
@WasExperimental(TypeAliasMarker::class)
|
||||
typealias T = <!OPT_IN_USAGE_ERROR!>C<!>
|
||||
|
||||
@ClassMarker
|
||||
fun test1() {
|
||||
<!OPT_IN_USAGE_ERROR!>C<!>()
|
||||
}
|
||||
|
||||
@ConstructorMarker
|
||||
fun test2() {
|
||||
<!OPT_IN_USAGE_ERROR!>C<!>()
|
||||
}
|
||||
|
||||
@ClassMarker
|
||||
@ConstructorMarker
|
||||
fun test3() {
|
||||
C()
|
||||
}
|
||||
|
||||
@ClassMarker
|
||||
fun test4(t: <!OPT_IN_USAGE_ERROR!>T<!>) {}
|
||||
|
||||
@TypeAliasMarker
|
||||
fun test5(t: <!OPT_IN_USAGE_ERROR!>T<!>) {}
|
||||
|
||||
@ClassMarker
|
||||
@TypeAliasMarker
|
||||
fun test6(t: T) {}
|
||||
+52
@@ -0,0 +1,52 @@
|
||||
// API_VERSION: 1.8
|
||||
// !DIAGNOSTICS: -INVISIBLE_MEMBER -INVISIBLE_REFERENCE
|
||||
|
||||
@RequiresOptIn
|
||||
@Retention(AnnotationRetention.BINARY)
|
||||
annotation class ClassMarker
|
||||
|
||||
@RequiresOptIn
|
||||
@Retention(AnnotationRetention.BINARY)
|
||||
annotation class ConstructorMarker
|
||||
|
||||
@RequiresOptIn
|
||||
@Retention(AnnotationRetention.BINARY)
|
||||
annotation class TypeAliasMarker
|
||||
|
||||
@SinceKotlin("1.9")
|
||||
@WasExperimental(ClassMarker::class)
|
||||
class C {
|
||||
@SinceKotlin("1.9")
|
||||
@WasExperimental(ConstructorMarker::class)
|
||||
constructor() {}
|
||||
}
|
||||
|
||||
@SinceKotlin("1.9")
|
||||
@WasExperimental(TypeAliasMarker::class)
|
||||
typealias T = <!OPT_IN_USAGE_ERROR!>C<!>
|
||||
|
||||
@ClassMarker
|
||||
fun test1() {
|
||||
<!UNRESOLVED_REFERENCE!>C<!>()
|
||||
}
|
||||
|
||||
@ConstructorMarker
|
||||
fun test2() {
|
||||
<!OPT_IN_USAGE_ERROR!>C<!>()
|
||||
}
|
||||
|
||||
@ClassMarker
|
||||
@ConstructorMarker
|
||||
fun test3() {
|
||||
C()
|
||||
}
|
||||
|
||||
@ClassMarker
|
||||
fun test4(t: <!OPT_IN_USAGE_ERROR!>T<!>) {}
|
||||
|
||||
@TypeAliasMarker
|
||||
fun test5(t: <!OPT_IN_USAGE_ERROR!>T<!>) {}
|
||||
|
||||
@ClassMarker
|
||||
@TypeAliasMarker
|
||||
fun test6(t: T) {}
|
||||
Reference in New Issue
Block a user