|
@@ -5,11 +5,11 @@
|
5
|
5
|
*/
|
6
|
6
|
package org.openzen.zenscript.codemodel.member;
|
7
|
7
|
|
8
|
|
-import java.lang.reflect.Modifier;
|
9
|
8
|
import org.openzen.zencode.shared.CodePosition;
|
10
|
9
|
import org.openzen.zenscript.codemodel.FunctionHeader;
|
11
|
10
|
import org.openzen.zenscript.codemodel.GenericMapper;
|
12
|
11
|
import org.openzen.zenscript.codemodel.HighLevelDefinition;
|
|
12
|
+import org.openzen.zenscript.codemodel.Modifiers;
|
13
|
13
|
import org.openzen.zenscript.codemodel.expression.Expression;
|
14
|
14
|
import org.openzen.zenscript.codemodel.expression.GetFieldExpression;
|
15
|
15
|
import org.openzen.zenscript.codemodel.expression.GetFunctionParameterExpression;
|
|
@@ -65,8 +65,9 @@ public class FieldMember extends PropertyMember {
|
65
|
65
|
parameters[i] = registry.getGeneric(definition.typeParameters[i]);
|
66
|
66
|
}
|
67
|
67
|
|
|
68
|
+ int autoMemberModifiers = modifiers & Modifiers.STATIC;
|
68
|
69
|
if (autoGetterAccess != 0) {
|
69
|
|
- this.autoGetter = new GetterMember(position, definition, autoGetterAccess, name, type, null);
|
|
70
|
+ this.autoGetter = new GetterMember(position, definition, autoGetterAccess | autoMemberModifiers, name, type, null);
|
70
|
71
|
this.autoGetter.setBody(new ReturnStatement(position, new GetFieldExpression(
|
71
|
72
|
position,
|
72
|
73
|
new ThisExpression(position, thisType),
|
|
@@ -75,7 +76,7 @@ public class FieldMember extends PropertyMember {
|
75
|
76
|
this.autoGetter = null;
|
76
|
77
|
}
|
77
|
78
|
if (autoSetterAccess != 0) {
|
78
|
|
- this.autoSetter = new SetterMember(position, definition, autoSetterAccess, name, type, null);
|
|
79
|
+ this.autoSetter = new SetterMember(position, definition, autoSetterAccess | autoMemberModifiers, name, type, null);
|
79
|
80
|
this.autoSetter.setBody(new ExpressionStatement(position, new SetFieldExpression(
|
80
|
81
|
position,
|
81
|
82
|
new ThisExpression(position, thisType),
|