From 3b3dbbab04d1dfa7f0ac37683380d70520af9638 Mon Sep 17 00:00:00 2001 From: Natalia Ukhorskaya Date: Tue, 1 Dec 2015 16:09:45 +0300 Subject: [PATCH] Evaluate expression for variable of function type #KT-10199 Fixed --- .../kotlin/idea/debugger/evaluate/FrameVisitor.kt | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/idea/src/org/jetbrains/kotlin/idea/debugger/evaluate/FrameVisitor.kt b/idea/src/org/jetbrains/kotlin/idea/debugger/evaluate/FrameVisitor.kt index 0479d14c918..8df9a371d4b 100644 --- a/idea/src/org/jetbrains/kotlin/idea/debugger/evaluate/FrameVisitor.kt +++ b/idea/src/org/jetbrains/kotlin/idea/debugger/evaluate/FrameVisitor.kt @@ -62,10 +62,14 @@ class FrameVisitor(context: EvaluationContextImpl) { } } - val localVariable = if (isFunctionType(asmType)) - findLocalVariableForLocalFun(name, asmType, checkType) - else - findLocalVariable(name, asmType, checkType) + if (isFunctionType(asmType)) { + val variableForLocalFun = findLocalVariableForLocalFun(name, asmType, checkType) + if (variableForLocalFun != null) { + return variableForLocalFun + } + } + + val localVariable = findLocalVariable(name, asmType, checkType) if (localVariable != null) { return localVariable