Rename fields on name clashing

#KT-3663 Fixed
 #KT-3664 Fixed
This commit is contained in:
Mikhael Bogdanov
2013-06-13 13:48:08 +04:00
parent 406f90badf
commit aec6deae9f
14 changed files with 177 additions and 60 deletions
@@ -27,6 +27,7 @@ import org.jetbrains.jet.lang.descriptors.impl.AnonymousFunctionDescriptor;
import org.jetbrains.jet.lang.descriptors.impl.NamespaceDescriptorParent;
import org.jetbrains.jet.lang.psi.JetElement;
import org.jetbrains.jet.lang.psi.JetFunction;
import org.jetbrains.jet.lang.psi.JetParameter;
import org.jetbrains.jet.lang.psi.JetProperty;
import org.jetbrains.jet.lang.resolve.constants.CompileTimeConstant;
import org.jetbrains.jet.lang.resolve.name.FqName;
@@ -586,4 +587,13 @@ public class DescriptorUtils {
}
return (PropertyDescriptor) descriptor;
}
@NotNull
public static PropertyDescriptor getPropertyDescriptor(@NotNull JetParameter constructorParameter, @NotNull BindingContext bindingContext) {
assert constructorParameter.getValOrVarNode() != null;
PropertyDescriptor descriptor = bindingContext.get(BindingContext.PRIMARY_CONSTRUCTOR_PARAMETER, constructorParameter);
assert descriptor != null;
return descriptor;
}
}