Introduce UnsafeVariance annotation
This commit is contained in:
@@ -119,6 +119,14 @@ public annotation class HiddenDeclaration
|
||||
@MustBeDocumented
|
||||
private annotation class external
|
||||
|
||||
/**
|
||||
* Suppresses errors about variance conflict
|
||||
*/
|
||||
@Target(TYPE)
|
||||
@Retention(SOURCE)
|
||||
@MustBeDocumented
|
||||
public annotation class UnsafeVariance
|
||||
|
||||
/**
|
||||
* Specifies that the corresponding type should be ignored during type inference.
|
||||
*/
|
||||
|
||||
@@ -151,6 +151,7 @@ public abstract class KotlinBuiltIns {
|
||||
public final FqName retention = annotationName("Retention");
|
||||
public final FqName repeatable = annotationName("Repeatable");
|
||||
public final FqName mustBeDocumented = annotationName("MustBeDocumented");
|
||||
public final FqName unsafeVariance = fqName("UnsafeVariance");
|
||||
|
||||
public final FqName mutableList = fqName("MutableList");
|
||||
public final FqName mutableSet = fqName("MutableSet");
|
||||
|
||||
@@ -26,6 +26,8 @@ public interface Annotations : Iterable<AnnotationDescriptor> {
|
||||
|
||||
public fun findAnnotation(fqName: FqName): AnnotationDescriptor?
|
||||
|
||||
public fun hasAnnotation(fqName: FqName) = findAnnotation(fqName) != null
|
||||
|
||||
public fun findExternalAnnotation(fqName: FqName): AnnotationDescriptor?
|
||||
|
||||
public fun getUseSiteTargetedAnnotations(): List<AnnotationWithTarget>
|
||||
|
||||
Reference in New Issue
Block a user