The following changes have been made that affect the CM language, or how it compiles:
In 13.5, enum types automatically implement a toS function, unless the -toS property is specified on the declaration. The toS method on generated box classes will refer to the unboxed toS, so the toS output on enum box classes and their unboxed equivalents will now match (by default).
Thus, if you want to implement your own toS for an enum, all you need to do is add -toS to the enum declaration and write your own toS function.
public enum foo : field access { foo; bar; baz; }; /** * This is a trivial toS function so it can be removed in 13.5 */ public str toS(foo f) { switch (f) { case foo: return "foo"; case bar: return "bar"; case baz: return "baz"; } } public enum bar : field access, -toS { foo; bar; baz; }; /** * This is a non-trivial toS function; add the -toS property to the enum declaration */ public str toS(bar f) { switch (f) { case foo: return "bar: foo"; case bar: return "bar: bar"; case baz: return "bar: baz"; } }
The setCount function on sequences (such as int[]) is now considered "unsafe" and should not be used where alternative solutions are available.