Debugger: step into default property getter/setter

#KT-7287 Fixed
This commit is contained in:
Natalia Ukhorskaya
2015-05-13 14:32:05 +03:00
parent f742188df9
commit 5edc25d2ba
6 changed files with 68 additions and 0 deletions
@@ -31,6 +31,7 @@ import org.jetbrains.kotlin.psi.*;
import org.jetbrains.kotlin.psi.psiUtil.PsiUtilPackage;
import org.jetbrains.kotlin.resolve.BindingContext;
import org.jetbrains.kotlin.resolve.DescriptorFactory;
import org.jetbrains.kotlin.resolve.DescriptorToSourceUtils;
import org.jetbrains.kotlin.resolve.calls.model.ResolvedCall;
import org.jetbrains.kotlin.resolve.constants.CompileTimeConstant;
import org.jetbrains.kotlin.resolve.jvm.jvmSignature.JvmMethodSignature;
@@ -389,6 +390,11 @@ public class PropertyCodegen {
PropertyDescriptor propertyDescriptor = callableDescriptor.getCorrespondingProperty();
StackValue property = codegen.intermediateValueForProperty(propertyDescriptor, true, null, StackValue.LOCAL_0);
PsiElement jetProperty = DescriptorToSourceUtils.descriptorToDeclaration(propertyDescriptor);
if (jetProperty instanceof JetProperty || jetProperty instanceof JetParameter) {
codegen.markLineNumber((JetElement) jetProperty, false);
}
if (callableDescriptor instanceof PropertyGetterDescriptor) {
Type type = signature.getReturnType();
property.put(type, v);