Simplify SamCodegenUtil.getOriginalIfSamAdapter
At the monent adapters are either: - synthetic extensions (no overrides) - static members: fake override always has one overridden from super class, that should be created as a result of SamAdapterDescriptor.createSubsitutedCopy(), hence should be instance of SamAdapterDescriptor
This commit is contained in:
@@ -35,15 +35,6 @@ public class SamCodegenUtil {
|
||||
return ((SamAdapterExtensionFunctionDescriptor) original).getSourceFunction();
|
||||
}
|
||||
|
||||
if (original.getKind() == CallableMemberDescriptor.Kind.FAKE_OVERRIDE) {
|
||||
for (FunctionDescriptor overridden : original.getOverriddenDescriptors()) {
|
||||
FunctionDescriptor originalIfSamAdapter = getOriginalIfSamAdapter(overridden);
|
||||
if (originalIfSamAdapter != null) {
|
||||
return originalIfSamAdapter;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
return null;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user