[NI] Fix traversing delegated constructor call chain

Use original descriptor instead of possibly substituted one: even though
the substitution is always trivial here, delegated constructor call is
recorded for the original constructor descriptor. So the code that
traverses the delegated constructor call chain should use original
descriptor, too.
This commit is contained in:
Dmitry Petrov
2017-06-06 16:08:55 +03:00
committed by Mikhail Zarechenskiy
parent 0634025229
commit 0136be3500
@@ -1474,7 +1474,7 @@ public class KotlinTypeMapper {
while (true) {
ResolvedCall<ConstructorDescriptor> next = getDelegationConstructorCall(bindingContext, descriptor);
if (next == null) return null;
descriptor = next.getResultingDescriptor();
descriptor = next.getResultingDescriptor().getOriginal();
if (descriptor.getContainingDeclaration() != constructorOwner) return next;
}
}