Open bwilkerson opened 9 months ago
Sounds good! I think this is in line with a natural expectation for the meaning of @immutable
(something like: If I evaluate an immutable property twice and get two results o1
and o2
then they are "the same" in some sense, e.g., identical(o1, o2)
or o1 == o2 && o2 == o1
).
Consider the following example (from @eernstg):
If the intention of the annotation is to ensure that the values of fields don't change, then we might want to disallow overriding fields with getters (whether all getters of a subset of getters is an interesting discussion question).