Fix a compatibility issue with AnnotationDescriptor
The `getSourceForArgument` method should be in the interface, but adding it is a breaking change for Java usages, since the module is not built with -Xjvm-default (KT-54749). Move the method to an extension. This doesn't change the behavior, since it was only ever called on LazyAnnotationDescriptor.
This commit is contained in:
committed by
Space Team
parent
af8b9e6700
commit
37b32907ab
-1
@@ -37,7 +37,6 @@ interface AnnotationDescriptor : AnnotationMarker {
|
||||
|
||||
val source: SourceElement
|
||||
|
||||
fun getSourceForArgument(name: Name): SourceElement = SourceElement.NO_SOURCE
|
||||
}
|
||||
|
||||
val AnnotationDescriptor.abbreviationFqName: FqName?
|
||||
|
||||
-6
@@ -67,12 +67,6 @@ public class AnnotationDescriptorImpl implements AnnotationDescriptor {
|
||||
return source;
|
||||
}
|
||||
|
||||
@NotNull
|
||||
@Override
|
||||
public SourceElement getSourceForArgument(@NotNull Name name) {
|
||||
return SourceElement.NO_SOURCE;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return DescriptorRenderer.FQ_NAMES_IN_TYPES.renderAnnotation(this, null);
|
||||
|
||||
Reference in New Issue
Block a user