Do not initialize properties in LIGHT_CLASSES mode

This commit is contained in:
Andrey Breslav
2014-06-05 12:57:32 +04:00
parent dd23b02dae
commit bbaf47d3db
@@ -259,7 +259,9 @@ public abstract class MemberCodegen<T extends JetElement/* TODO: & JetDeclaratio
assert propertyDescriptor != null;
CompileTimeConstant<?> compileTimeValue = propertyDescriptor.getCompileTimeInitializer();
if (compileTimeValue == null) return true;
// we must write constant values for fields in light classes,
// because Java's completion for annotation arguments uses this information
if (compileTimeValue == null) return state.getClassBuilderMode() != ClassBuilderMode.LIGHT_CLASSES;
//TODO: OPTIMIZATION: don't initialize static final fields