[psi2ir] Emit source info for annotation parameters
We need this in the JS IR backend for annotations like @JsFun and @JsPolyfill
This commit is contained in:
+2
@@ -36,6 +36,8 @@ interface AnnotationDescriptor : AnnotationMarker {
|
||||
val allValueArguments: Map<Name, ConstantValue<*>>
|
||||
|
||||
val source: SourceElement
|
||||
|
||||
fun getSourceForArgument(name: Name): SourceElement = SourceElement.NO_SOURCE
|
||||
}
|
||||
|
||||
val AnnotationDescriptor.abbreviationFqName: FqName?
|
||||
|
||||
+7
@@ -25,6 +25,7 @@ import org.jetbrains.kotlin.renderer.DescriptorRenderer;
|
||||
import org.jetbrains.kotlin.resolve.constants.ConstantValue;
|
||||
import org.jetbrains.kotlin.types.KotlinType;
|
||||
|
||||
import java.util.Collections;
|
||||
import java.util.Map;
|
||||
|
||||
public class AnnotationDescriptorImpl implements AnnotationDescriptor {
|
||||
@@ -66,6 +67,12 @@ 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