enum on AA's and delegates debug info
Bert
Bert at gmail.com
Mon Jul 1 20:39:02 UTC 2019
On Monday, 1 July 2019 at 06:54:17 UTC, Rainer Schuetze wrote:
>
>
> 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
>
That is unfortunate. Is there not a way to get the proper type?
In the json file I have
"deco" : "HE14test13AADFCQBj6SZv",
"originalType" : "X[][A]",
Here A is the enum, it clearly knows it in the json... I wonder
if that could be used to realize that the int can be converted to
an A?
Visual D could simply try to convert any values to A and use the
name if it passes, else fallback to the int.
>> 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.
Any ETA on it?
More information about the Digitalmars-d-ide
mailing list