Any suggestions on dmd error message formatting?

SealabJaster sealabjaster at gmail.com
Sat May 15 09:33:45 UTC 2021


On Saturday, 15 May 2021 at 08:15:19 UTC, Chris Piker wrote:
> I did much the same as you and reformatted the error message to 
> find the bug.  As to the larger question of how to 
> automatically process compiler output... got any ideas?

Hope someone who knows how to modify DMD bothers to:

1. Implement some kind of ability for that to work.
2. Convinces Walter to let it through.

I can't do either, so just have to hope this issue is finally 
tackled at some point in the future.

> My guess is that the `Result` item is a hint.  `Result` 
> probably never equals another `Result` no matter what.

Yea, I can't see what's wrong just from that either.

My best guess is `Result` might be embedded within another 
templated thing, which might be different than the `Result` that 
the function is expecting. Place a couple of `pragma(msg, 
Result.stringof); // Might need to use typeof(Result).stringof, 
or even __traits(identifier, Result)` wherever it might be 
relevant, and see if that shows anything fun.

I also really can't see where else there'd be a type mismatch, 
especially if a `.array` is what fixes things.

e.g. `RangeThatReturns!OtherRange.Result != 
RangeThatReturns!(int[]).Result`

But other than that, I can't tell just from that error snippet.


More information about the Digitalmars-d-learn mailing list