Namespace properties can directly be accessed via backing field.
This commit is contained in:
committed by
Maxim Shafirov
parent
244fc31da8
commit
de50b2c191
@@ -85,9 +85,13 @@ public class PropertyCodegen {
|
|||||||
value = ((JetConstantExpression) initializer).getValue();
|
value = ((JetConstantExpression) initializer).getValue();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
int modifiers = Opcodes.ACC_PRIVATE;
|
final int modifiers;
|
||||||
if (kind == OwnerKind.NAMESPACE) {
|
if (kind == OwnerKind.NAMESPACE) {
|
||||||
modifiers |= Opcodes.ACC_STATIC;
|
int access = isExternallyAccessible(p) ? Opcodes.ACC_PUBLIC : Opcodes.ACC_PRIVATE;
|
||||||
|
modifiers = access | Opcodes.ACC_STATIC;
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
modifiers = Opcodes.ACC_PRIVATE;
|
||||||
}
|
}
|
||||||
v.visitField(modifiers, p.getName(), mapper.mapType(propertyDescriptor.getOutType()).getDescriptor(), null, value);
|
v.visitField(modifiers, p.getName(), mapper.mapType(propertyDescriptor.getOutType()).getDescriptor(), null, value);
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user