Best error msg ever

Era Scarecrow via Digitalmars-d digitalmars-d at puremagic.com
Thu Feb 9 18:53:50 PST 2017


On Thursday, 9 February 2017 at 21:28:58 UTC, Sönke Ludwig wrote:
> Am 09.02.2017 um 22:20 schrieb Daniel Kozak:
>> source/app.d(51,37): Error: function 
>> dub.internal.utils.jsonFromFile (Path file, bool silent_fail = 
>> false) is not callable using argument types (Path, bool)
>>
>> WTF?
>
> Must be caused by Path meaning two different type definitions.

  I'll have to agree. Back in ... 2009? I was in a company where 
we were doing web development for a bit, and one curious error 
that came up was when trying to assign or work with the Date 
object. Seems the built in Date class wasn't the same as the 
Sql.Date that was being used (but had the same name). Apparently 
it took like 2 hours to figure out what was going on.

  In cases like these i really wish the structure of the 
class/struct had a hash or something (based on source or struct 
layout or something) to help differentiate it rather than just by 
name, and reverse lookup the exact file location(s) of where the 
struct in question comes from.


More information about the Digitalmars-d mailing list