TDPL goes out for preliminary review

Jason House jason.james.house at gmail.com
Thu Dec 24 06:20:33 PST 2009


Andrei Alexandrescu wrote:

> Jason House wrote:
>> bugzilla 3640
>>      shared this() constructor does not work and reports strange errors
>>      without line numbers
>> 
>> bugzilla 3641 keywords: rejects-valid
>>     alias shared T U does not work
>> 
>> bugzilla 3642 keywords: diagnostic
>>     Poor error message when using shared:
>>     function ___ not callable with argument types ___
>> 
> 
> Great. I just got word from Walter that he fixed a lot of shared bugs
> (most reported and some probably not yet reported), so I expect the
> situation to get considerably better with the next minor release.
> 
> Andrei

The commit logs show that bugzilla 3641 was fixed.  I'd appreciate it if 
someone could translate what other shared coding constructs were fixed by 
Walter's changes.

Even a partial fix to 3640 to include line numbers would probably help 
people.  My grep results below show where the message is being generated.  I 
see there's a variant of error that accepts a location parameter, but this 
error doesn't use it.  What surprises me is that it looks like nearly every 
call to error lacks a location parameter.  I'm confused why this would be.  
I don't normally notice a lack of line numbers in most error messages I see 
from dmd.

/usr/local/src/dmd/cast.c:104:    error("cannot implicitly convert 
expression (%s) of type %s to %s",

Maybe the biggest help for those converting to shared would be inclusion of 
why a particular variable is shared and causing the error.  Shared can be 
viral, and exactly how a piece of code is getting called in shared context 
can occasionally be a bit unclear.  I think there was a related patch for 
inclusion of stack traces with templated code?



More information about the Digitalmars-d mailing list