## test case
```
enum E { e1 = S.a }
struct S
{
E e;
enum a = "string";
}
```
## output
> /tmp/temp_7F3BFB9249F0.d:6:14: Error: cannot implicitly convert expression `"string"` of type `string` to `int`
## notes
- if you change the initializer of `S.a` to an integer literal then the program compiles.
Comment #1 by b2.temp — 2022-04-30T23:56:27Z
semantic analysis of E members causes a semantic analysis of S, causing E to be visited again.
a separate semantic analysis should be done for static/immutable/enum members,
since they are just basically like module declarations.
Comment #2 by b2.temp — 2023-07-14T21:19:50Z
maybe at least the circular reference could be detected. That'd give a better error message.
Comment #3 by robert.schadek — 2024-12-13T19:22:30Z