Skip to content
This repository has been archived by the owner on Apr 13, 2023. It is now read-only.

Commit

Permalink
Issue #3544: implement assignment to late+specified values
Browse files Browse the repository at this point in the history
  • Loading branch information
tombentley committed Jan 24, 2017
1 parent 99d9761 commit cf01ec3
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 7 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -520,10 +520,6 @@ public List<JCTree> transformAttribute(
builder.is(Flags.NATIVE, true);
builder.isJavaNative(true);
}
if (memoized && !declarationModel.isVariable()) {
builder.immutable();
}


// For captured local variable Values, use a VariableBox
if (Decl.isBoxedVariable(declarationModel)) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3560,9 +3560,7 @@ public void transform(Tree.AttributeDeclaration decl, ClassDefinitionBuilder cla
if (Decl.isVariable(decl) || Decl.isLate(decl)) {
if (!withinInterface || model.isShared()) {
// Generate setter in main class or interface (when shared)
if (!memoized || Decl.isVariable(decl)) {
classBuilder.attribute(makeSetter(decl, false, lazy, memoizedInitialValue));
}
classBuilder.attribute(makeSetter(decl, false, lazy, memoizedInitialValue));
}
if (withinInterface && lazy) {
// Generate setter in companion class
Expand Down

0 comments on commit cf01ec3

Please sign in to comment.