Fix concrete method inheritance in interfaces
For each non-abstract non-declared (i.e. inherited from supertypes) method in an interface we generate its static form to the TImpl, which calls the TImpl method from the corresponding supertype. The accidental override tests changed because we're now trying to generate the delegate for the super method, not knowing that it will clash with the declared method #KT-2888 Fixed #KT-5393 Fixed
This commit is contained in:
@@ -18,6 +18,8 @@ package org.jetbrains.kotlin.descriptors;
|
||||
|
||||
import org.jetbrains.annotations.NotNull;
|
||||
|
||||
import java.util.Set;
|
||||
|
||||
public interface PropertyAccessorDescriptor extends FunctionDescriptor {
|
||||
boolean hasBody();
|
||||
|
||||
@@ -27,6 +29,10 @@ public interface PropertyAccessorDescriptor extends FunctionDescriptor {
|
||||
@Override
|
||||
PropertyAccessorDescriptor getOriginal();
|
||||
|
||||
@Override
|
||||
@NotNull
|
||||
Set<? extends PropertyAccessorDescriptor> getOverriddenDescriptors();
|
||||
|
||||
@NotNull
|
||||
PropertyDescriptor getCorrespondingProperty();
|
||||
|
||||
|
||||
@@ -18,8 +18,14 @@ package org.jetbrains.kotlin.descriptors;
|
||||
|
||||
import org.jetbrains.annotations.NotNull;
|
||||
|
||||
import java.util.Set;
|
||||
|
||||
public interface PropertyGetterDescriptor extends PropertyAccessorDescriptor {
|
||||
@NotNull
|
||||
@Override
|
||||
PropertyGetterDescriptor getOriginal();
|
||||
|
||||
@Override
|
||||
@NotNull
|
||||
Set<? extends PropertyGetterDescriptor> getOverriddenDescriptors();
|
||||
}
|
||||
|
||||
@@ -18,8 +18,14 @@ package org.jetbrains.kotlin.descriptors;
|
||||
|
||||
import org.jetbrains.annotations.NotNull;
|
||||
|
||||
import java.util.Set;
|
||||
|
||||
public interface PropertySetterDescriptor extends PropertyAccessorDescriptor {
|
||||
@NotNull
|
||||
@Override
|
||||
PropertySetterDescriptor getOriginal();
|
||||
|
||||
@Override
|
||||
@NotNull
|
||||
Set<? extends PropertySetterDescriptor> getOverriddenDescriptors();
|
||||
}
|
||||
|
||||
+3
-2
@@ -56,8 +56,9 @@ public class PropertyGetterDescriptorImpl extends PropertyAccessorDescriptorImpl
|
||||
|
||||
@NotNull
|
||||
@Override
|
||||
public Set<? extends PropertyAccessorDescriptor> getOverriddenDescriptors() {
|
||||
return super.getOverriddenDescriptors(true);
|
||||
@SuppressWarnings("unchecked")
|
||||
public Set<? extends PropertyGetterDescriptor> getOverriddenDescriptors() {
|
||||
return (Set) super.getOverriddenDescriptors(true);
|
||||
}
|
||||
|
||||
@NotNull
|
||||
|
||||
+3
-2
@@ -72,8 +72,9 @@ public class PropertySetterDescriptorImpl extends PropertyAccessorDescriptorImpl
|
||||
|
||||
@NotNull
|
||||
@Override
|
||||
public Set<? extends PropertyAccessorDescriptor> getOverriddenDescriptors() {
|
||||
return super.getOverriddenDescriptors(false);
|
||||
@SuppressWarnings("unchecked")
|
||||
public Set<? extends PropertySetterDescriptor> getOverriddenDescriptors() {
|
||||
return (Set) super.getOverriddenDescriptors(false);
|
||||
}
|
||||
|
||||
@NotNull
|
||||
|
||||
Reference in New Issue
Block a user