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:
Denis Zharkov
2016-03-14 16:48:06 +03:00
parent 1d0c37ff20
commit bfa0b69ba9
@@ -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;
}