Use original descriptor when working with errors in KotlinSignature
Otherwise enhanced version are treated differently
This commit is contained in:
+5
-3
@@ -33,9 +33,10 @@ public class JavaPropertyDescriptor extends PropertyDescriptorImpl implements Ja
|
||||
@NotNull Visibility visibility,
|
||||
boolean isVar,
|
||||
@NotNull Name name,
|
||||
@NotNull SourceElement source
|
||||
@NotNull SourceElement source,
|
||||
@Nullable PropertyDescriptor original
|
||||
) {
|
||||
super(containingDeclaration, null, annotations, Modality.FINAL, visibility, isVar, name, Kind.DECLARATION, source);
|
||||
super(containingDeclaration, original, annotations, Modality.FINAL, visibility, isVar, name, Kind.DECLARATION, source);
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -56,7 +57,8 @@ public class JavaPropertyDescriptor extends PropertyDescriptorImpl implements Ja
|
||||
getVisibility(),
|
||||
isVar(),
|
||||
getName(),
|
||||
getSource()
|
||||
getSource(),
|
||||
getOriginal()
|
||||
);
|
||||
assert getGetter() == null : "Field must not have a getter: " + this;
|
||||
assert getSetter() == null : "Field must not have a setter: " + this;
|
||||
|
||||
+1
-1
@@ -104,7 +104,7 @@ public class LazyJavaClassMemberScope(
|
||||
|
||||
val propertyDescriptor = JavaPropertyDescriptor(
|
||||
getContainingDeclaration(), annotations, method.getVisibility(),
|
||||
/* isVar = */ false, method.getName(), c.sourceElementFactory.source(method)
|
||||
/* isVar = */ false, method.getName(), c.sourceElementFactory.source(method), /* original */ null
|
||||
)
|
||||
|
||||
// default getter is necessary because there is no real field in annotation
|
||||
|
||||
+1
-1
@@ -276,7 +276,7 @@ public abstract class LazyJavaMemberScope(
|
||||
val propertyName = field.getName()
|
||||
|
||||
return JavaPropertyDescriptor(containingDeclaration, annotations, visibility, isVar, propertyName,
|
||||
c.sourceElementFactory.source(field))
|
||||
c.sourceElementFactory.source(field), /* original = */ null)
|
||||
}
|
||||
|
||||
private fun getPropertyType(field: JavaField, annotations: Annotations): JetType {
|
||||
|
||||
Reference in New Issue
Block a user