Inheritance is constrained in one direction only, which means a readonly base cannot be subverted and a mutable base can still be tightened. The symmetry is the surprise:…
The attribute opts a class out of the deprecation, which is occasionally correct and is usually a way of deferring a rename. Inheritance of the attribute is the…
serialize on a pure enum stores the case name, and on a backed enum stores the value, which makes the two behave differently across a rename. Native serialisation…
An enum cannot be extended, so every constant on it is final by construction and the keyword is redundant rather than forbidden. A constant whose value is a…
A case is a singleton, so a mutable property on it would be shared by every reference in the process, and the language forbids properties outright rather than…