enum on AA's and delegates debug info

Rainer Schuetze r.sagitario at gmx.de
Mon Jul 1 06:54:17 UTC 2019



On 01/07/2019 01:27, Bert wrote:
> an AA using an enum uses int as the base type rather than the enum
> member name.
> 
> enum X { A, B, C};
> AA[X] x;
> 
> will show
> 
> [0]
> [1]
> 
> instead of
> 
> [A]
> [B]
> 

That's a long standing compiler bug:
https://issues.dlang.org/show_bug.cgi?id=982,
https://issues.dlang.org/show_bug.cgi?id=4372

> It shouldn't be hard to get it to display the names through conversion.
> 
> Also,
> 
> delegates in an array do not show any value. This makes it difficult to
> know if they actually any value. Maybe you could just show the address
> of the delegate?

It also doesn't show a delegate outside of an array. Implemented now for
the next release.


More information about the Digitalmars-d-ide mailing list