Do not try to detect cycles if delegation call resolution is unsuccessful

This commit is contained in:
Denis Zharkov
2015-03-23 11:06:48 +03:00
parent 9da88bbd0f
commit 023e1a13a9
3 changed files with 3 additions and 3 deletions
@@ -229,7 +229,7 @@ public class BodyResolver {
@Nullable
private ConstructorDescriptor getDelegatedConstructor(@NotNull ConstructorDescriptor constructor) {
ResolvedCall<ConstructorDescriptor> call = trace.get(CONSTRUCTOR_RESOLVED_DELEGATION_CALL, constructor);
return call == null ? null : call.getResultingDescriptor().getOriginal();
return call == null || !call.getStatus().isSuccess() ? null : call.getResultingDescriptor().getOriginal();
}
public void resolveBodies(@NotNull BodiesResolveContext c) {