Skip to content

Commit

Permalink
Fix #338
Browse files Browse the repository at this point in the history
  • Loading branch information
gavinking committed Jun 19, 2012
1 parent 44e0b39 commit 905a999
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -2348,7 +2348,7 @@ private void visitSetAssignmentOperator(Tree.BitwiseAssignmentOp that) {
checkAssignable(rhset, lhset, that.getRightTerm(),
"resulting set element type must be assignable to to declared set element type");
}
that.setTypeModel(unit.getSetType(lhst)); //in theory, we could make this narrower
that.setTypeModel(unit.getSetType(lhset)); //in theory, we could make this narrower
}
}

Expand Down
4 changes: 4 additions & 0 deletions test/main/typing/Operators.ceylon
Original file line number Diff line number Diff line change
Expand Up @@ -298,4 +298,8 @@ class Operators() {
@type["Set<String>"] value sr4 = ss&so;
@type["Set<Object>"] value sr5 = ss|so;

variable Set<String> vss := ss;
@type["Set<String>"] vss|=ss;
@type["Set<String>"] vss&=ss;

}

0 comments on commit 905a999

Please sign in to comment.