diff --git a/compiler/backend/src/org/jetbrains/kotlin/codegen/TailRecursionCodegen.java b/compiler/backend/src/org/jetbrains/kotlin/codegen/TailRecursionCodegen.java index af0916dc09f..02a4e7bc616 100644 --- a/compiler/backend/src/org/jetbrains/kotlin/codegen/TailRecursionCodegen.java +++ b/compiler/backend/src/org/jetbrains/kotlin/codegen/TailRecursionCodegen.java @@ -1,5 +1,5 @@ /* - * Copyright 2010-2015 JetBrains s.r.o. + * Copyright 2010-2016 JetBrains s.r.o. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -60,7 +60,7 @@ public class TailRecursionCodegen { } public boolean isTailRecursion(@NotNull ResolvedCall resolvedCall) { - TailRecursionKind status = state.getBindingContext().get(TAIL_RECURSION_CALL, resolvedCall); + TailRecursionKind status = state.getBindingContext().get(TAIL_RECURSION_CALL, resolvedCall.getCall()); return status != null && status.isDoGenerateTailRecursion(); } diff --git a/compiler/frontend/src/org/jetbrains/kotlin/cfg/ControlFlowInformationProvider.java b/compiler/frontend/src/org/jetbrains/kotlin/cfg/ControlFlowInformationProvider.java index 110b74ad7e8..9eb680efdb5 100644 --- a/compiler/frontend/src/org/jetbrains/kotlin/cfg/ControlFlowInformationProvider.java +++ b/compiler/frontend/src/org/jetbrains/kotlin/cfg/ControlFlowInformationProvider.java @@ -1,5 +1,5 @@ /* - * Copyright 2010-2015 JetBrains s.r.o. + * Copyright 2010-2016 JetBrains s.r.o. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -1006,7 +1006,7 @@ public class ControlFlowInformationProvider { KindAndCall kindAndCall = entry.getValue(); switch (kindAndCall.kind) { case TAIL_CALL: - trace.record(TAIL_RECURSION_CALL, kindAndCall.call, TailRecursionKind.TAIL_CALL); + trace.record(TAIL_RECURSION_CALL, kindAndCall.call.getCall(), TailRecursionKind.TAIL_CALL); hasTailCalls = true; break; case IN_TRY: diff --git a/compiler/frontend/src/org/jetbrains/kotlin/resolve/BindingContext.java b/compiler/frontend/src/org/jetbrains/kotlin/resolve/BindingContext.java index bb84530891e..40e296f36b9 100644 --- a/compiler/frontend/src/org/jetbrains/kotlin/resolve/BindingContext.java +++ b/compiler/frontend/src/org/jetbrains/kotlin/resolve/BindingContext.java @@ -1,5 +1,5 @@ /* - * Copyright 2010-2015 JetBrains s.r.o. + * Copyright 2010-2016 JetBrains s.r.o. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -111,7 +111,7 @@ public interface BindingContext { new BasicWritableSlice(DO_NOTHING); WritableSlice> RESOLVED_CALL = new BasicWritableSlice>(DO_NOTHING); - WritableSlice, TailRecursionKind> TAIL_RECURSION_CALL = Slices.createSimpleSlice(); + WritableSlice TAIL_RECURSION_CALL = Slices.createSimpleSlice(); WritableSlice CONSTRAINT_SYSTEM_COMPLETER = new BasicWritableSlice(DO_NOTHING); WritableSlice CALL = new BasicWritableSlice(DO_NOTHING);