Can't access enum from a different module when it was generated by a string mixin.
realhet
real_het at hotmail.com
Mon Mar 31 15:23:53 UTC 2025
On Monday, 31 March 2025 at 14:59:21 UTC, FeepingCreature wrote:
> Can you give a repro? It works here.
You are right, I just tested in small scale and it worked.
```
module a;
enum EGood:ubyte {e1, e2}
mixin(q{enum EBad:ubyte {e1, e2} });
struct Dummy { mixin(q{enum EUgly:ubyte {e1, e2} }); }
alias EUgly = Dummy.EUgly;
```
```
module b;
import std, a;
void main()
{
writeln(EGood.init);
writeln(EBad.init); //In the big project, this fails.
writeln(EUgly.init);
}
```
I have the problem in an 50KLOC project. I gotta narrow it
down...
More information about the Digitalmars-d-learn
mailing list