From 0136be350072a7953d44cb2675feb36a017180c7 Mon Sep 17 00:00:00 2001 From: Dmitry Petrov Date: Tue, 6 Jun 2017 16:08:55 +0300 Subject: [PATCH] [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. --- .../org/jetbrains/kotlin/codegen/state/KotlinTypeMapper.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/compiler/backend/src/org/jetbrains/kotlin/codegen/state/KotlinTypeMapper.java b/compiler/backend/src/org/jetbrains/kotlin/codegen/state/KotlinTypeMapper.java index 4a206ee7170..2e235b10e5e 100644 --- a/compiler/backend/src/org/jetbrains/kotlin/codegen/state/KotlinTypeMapper.java +++ b/compiler/backend/src/org/jetbrains/kotlin/codegen/state/KotlinTypeMapper.java @@ -1474,7 +1474,7 @@ public class KotlinTypeMapper { while (true) { ResolvedCall next = getDelegationConstructorCall(bindingContext, descriptor); if (next == null) return null; - descriptor = next.getResultingDescriptor(); + descriptor = next.getResultingDescriptor().getOriginal(); if (descriptor.getContainingDeclaration() != constructorOwner) return next; } }