-- Error:
2 | @annotation.experimental case A
| ^
|value A is marked @experimental and therefore may only be used in an experimental scope.
Expectation
The error makes sense, as values, valueOf, fromOrdinal etc reference A, but it does mean we can not "evolve" our enum to add new cases without making every method experimental.
Or perhaps those methods should all automatically become experimental as soon as an experimental case is added? (not good for downstream users of a library)
Compiler version
3.1.0
Minimized code
Output
Expectation
The error makes sense, as
values
,valueOf
,fromOrdinal
etc referenceA
, but it does mean we can not "evolve" our enum to add new cases without making every method experimental.Or perhaps those methods should all automatically become experimental as soon as an experimental case is added? (not good for downstream users of a library)