The following code produces the error: "cannot implicitly convert expression `E.One` of type `E` to `string`" but reports the error to be in line 2. The error is in line 5 where E.One is being assigned to Test.
~~~~~
import std.stdio;
enum E { One, Two }
void main() {
enum R: string {
Test = E.One
}
writeln(R.Test);
}
~~~~~
Comment #1 by robert.schadek — 2024-12-13T19:16:35Z