Minor, drop handling of deprecated kotlin.Extension annotation
This commit is contained in:
@@ -204,9 +204,6 @@ public abstract class KotlinBuiltIns {
|
||||
public final FqNameUnsafe kCallable = reflect("KCallable");
|
||||
public final ClassId kProperty = ClassId.topLevel(reflect("KProperty").toSafe());
|
||||
|
||||
// TODO: remove in 1.0
|
||||
public final FqName deprecatedExtensionAnnotation = fqName("Extension");
|
||||
|
||||
public final Map<FqNameUnsafe, PrimitiveType> fqNameToPrimitiveType;
|
||||
public final Map<FqNameUnsafe, PrimitiveType> arrayClassFqNameToPrimitiveType;
|
||||
{
|
||||
@@ -813,14 +810,13 @@ public abstract class KotlinBuiltIns {
|
||||
}
|
||||
|
||||
@NotNull
|
||||
public AnnotationDescriptor createExtensionAnnotation() {
|
||||
private AnnotationDescriptor createExtensionFunctionTypeAnnotation() {
|
||||
return new AnnotationDescriptorImpl(getBuiltInClassByName(FQ_NAMES.extensionFunctionType.shortName()).getDefaultType(),
|
||||
Collections.<ValueParameterDescriptor, ConstantValue<?>>emptyMap(), SourceElement.NO_SOURCE);
|
||||
}
|
||||
|
||||
private static boolean isTypeAnnotatedWithExtension(@NotNull KotlinType type) {
|
||||
return type.getAnnotations().findAnnotation(FQ_NAMES.extensionFunctionType) != null ||
|
||||
type.getAnnotations().findAnnotation(FQ_NAMES.deprecatedExtensionAnnotation) != null;
|
||||
return type.getAnnotations().findAnnotation(FQ_NAMES.extensionFunctionType) != null;
|
||||
}
|
||||
|
||||
@NotNull
|
||||
@@ -844,7 +840,7 @@ public abstract class KotlinBuiltIns {
|
||||
if (annotations.findAnnotation(FQ_NAMES.extensionFunctionType) != null) return annotations;
|
||||
|
||||
// TODO: preserve laziness of given annotations
|
||||
return new AnnotationsImpl(plus(annotations, listOf(createExtensionAnnotation())));
|
||||
return new AnnotationsImpl(plus(annotations, listOf(createExtensionFunctionTypeAnnotation())));
|
||||
}
|
||||
|
||||
@NotNull
|
||||
|
||||
+1
-2
@@ -81,8 +81,7 @@ class TypeClsStubBuilder(private val c: ClsStubBuilderContext) {
|
||||
&& type.argumentList.none { it.projection == Projection.STAR }
|
||||
if (shouldBuildAsFunctionType) {
|
||||
val extension = annotations.any { annotation ->
|
||||
val fqName = annotation.asSingleFqName()
|
||||
fqName == KotlinBuiltIns.FQ_NAMES.extensionFunctionType || fqName == KotlinBuiltIns.FQ_NAMES.deprecatedExtensionAnnotation
|
||||
annotation.asSingleFqName() == KotlinBuiltIns.FQ_NAMES.extensionFunctionType
|
||||
}
|
||||
createFunctionTypeStub(parent, type, extension)
|
||||
return
|
||||
|
||||
Reference in New Issue
Block a user