Today's compiler error message

IchorDev zxinsworld at gmail.com
Tue Jul 18 03:40:09 UTC 2023


On Friday, 14 July 2023 at 07:58:36 UTC, Stefan Koch wrote:
>
> Do you know how to use the dustmite tool?
> [https://github.com/CyberShadow/DustMite]
> If not please get familiar with it and reduce the bug in your 
> codebase.
>
> Cheers,
> Stefan

Never used it before.
I had an issue yesterday where an alias from a mixin was not 
being found by a module that was being used by an import of the 
module where the alias was declared. Like this:

A:
```d
import B;
mixin("
import foreign.code;
alias x = foreign.code.y!false;
");
```
B:
```d
import C;

C.Type blabla;
```
C:
```d
import A;

struct Type{}

A.x(); //ERROR! Undefined identifier!
```

Perhaps DustMite would be good for reducing this kind of error to 
its components as well. I’ll look into it if I find any more 
weird ones. :)

I think we need a dedicated thread for sharing obtuse compiler 
messages, alongside what the *actual* error ended up being. Often 
the compilers really just doesn’t understand how to tell us what 
we did wrong. Especially if the error is a bit weird, like a 
missing quote.


More information about the Digitalmars-d mailing list