Refactored methods for val/var in PSI
This commit is contained in:
@@ -104,7 +104,7 @@ public abstract class ClassBodyCodegen extends MemberCodegen<JetClassOrObject> {
|
||||
private void generatePrimaryConstructorProperties(PropertyCodegen propertyCodegen, JetClassOrObject origin) {
|
||||
boolean isAnnotation = origin instanceof JetClass && ((JetClass) origin).isAnnotation();
|
||||
for (JetParameter p : getPrimaryConstructorParameters()) {
|
||||
if (p.hasValOrVarNode()) {
|
||||
if (p.hasValOrVar()) {
|
||||
PropertyDescriptor propertyDescriptor = bindingContext.get(BindingContext.PRIMARY_CONSTRUCTOR_PARAMETER, p);
|
||||
if (propertyDescriptor != null) {
|
||||
if (!isAnnotation) {
|
||||
|
||||
@@ -1109,7 +1109,7 @@ public class ImplementationBodyCodegen extends ClassBodyCodegen {
|
||||
int curParam = 0;
|
||||
List<ValueParameterDescriptor> parameters = constructorDescriptor.getValueParameters();
|
||||
for (JetParameter parameter : getPrimaryConstructorParameters()) {
|
||||
if (parameter.hasValOrVarNode()) {
|
||||
if (parameter.hasValOrVar()) {
|
||||
VariableDescriptor descriptor = parameters.get(curParam);
|
||||
Type type = typeMapper.mapType(descriptor);
|
||||
iv.load(0, classAsmType);
|
||||
|
||||
Reference in New Issue
Block a user