Record resolved delegation call for primary ctor if single result

Do the same thing as for secondary constructor (looks like it was a
workaround for R&I bug that was used only for secondary constructors
for some reason).

 #KT-17464 Fixed Target versions 1.1.5
This commit is contained in:
Dmitry Petrov
2017-07-24 11:07:52 +03:00
parent c9ad290ad5
commit b81ca31aae
7 changed files with 99 additions and 1 deletions
@@ -328,7 +328,7 @@ public class BodyResolver {
OverloadResolutionResults<FunctionDescriptor> results = callResolver.resolveFunctionCall(
trace, scopeForConstructor,
CallMaker.makeConstructorCallWithoutTypeArguments(call), NO_EXPECTED_TYPE, outerDataFlowInfo, false);
if (results.isSuccess()) {
if (results.isSingleResult()) {
KotlinType supertype = results.getResultingDescriptor().getReturnType();
recordSupertype(typeReference, supertype);
ClassDescriptor classDescriptor = TypeUtils.getClassDescriptor(supertype);