Closed samreid closed 5 years ago
@jonathanolson said:
This doesn't happen in strict mode, which we use. It throws a type error
I tested that in strict mode, Enumeration cannot assign values. I tried:
CardinalDirection.WEST=CardinalDirection.EAST;
and received:
Cannot assign to read only property 'WEST' of object '#
'
I also noted this is covered in the Enumeration unit tests:
window.assert && assert.throws( function() {
E.SOMETHING_AFTER_THE_FREEZE = 5;
}, 'Should not be able to set things after initialization' );
@pixelzoom can this issue be closed?
In #42 @pixelzoom said: