dmd: why not use fully qualified names for types in error messages?

Daniel Kozak via Digitalmars-d digitalmars-d at puremagic.com
Wed Jun 14 01:44:23 PDT 2017


http://forum.dlang.org/post/fyzwknqumopldiktiuvj@forum.dlang.org

http://forum.dlang.org/post/xpmpakmusudanwuzzezl@forum.dlang.org

https://issues.dlang.org/show_bug.cgi?id=9631

On Wed, Jun 14, 2017 at 10:21 AM, Nicholas Wilson via Digitalmars-d <
digitalmars-d at puremagic.com> wrote:

> On Wednesday, 14 June 2017 at 06:33:26 UTC, Jacob Carlborg wrote:
>
>> On 2017-06-14 06:50, Timothee Cour via Digitalmars-d wrote:
>>
>>> eg:
>>> Error: no property 'IF_gray' for type 'ImageFormat'
>>> =>
>>> Error: no property 'IF_gray' for type 'foo.bar.ImageFormat'
>>>
>>> and also, why not show where the symbol is defined?
>>>
>>> would PR's for that be accepted? is that hard to implement?
>>>
>>
>> Technically, for templates, the fully qualified name include all the
>> template arguments. In many (some) cases  this will be way too long to
>> print.
>>
>
> Perhaps some simple heuristic of length (> 80 chars?) would suffice?
> Or perhaps Error: no property 'IF_gray' for type 'ImageFormat' from module
> 'foo.bar'.
>
> One of the most confusing errors to get is
>
>> Error: no property 'IF_gray' for type 'ImageFormat'
>>
> when 'ImageFormat ' does have that property but it uses a different
> 'ImageFormat' (in another module) that doesn't.
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.puremagic.com/pipermail/digitalmars-d/attachments/20170614/9626d028/attachment.html>


More information about the Digitalmars-d mailing list