AssociativeArray.opIndex

Daniel Murphy yebblies at nospamgmail.com
Sat Mar 3 19:05:06 PST 2012


"H. S. Teoh" <hsteoh at quickfur.ath.cx> wrote in message 
news:mailman.350.1330790511.24984.digitalmars-d at puremagic.com...
> On Sat, Mar 03, 2012 at 10:50:10PM +1100, Daniel Murphy wrote:
>> "H. S. Teoh" <hsteoh at quickfur.ath.cx> wrote in message
>> news:mailman.341.1330753339.24984.digitalmars-d at puremagic.com...
>> > Value opIndex(Key key, int file=__FILE__, int line=__LINE__)
>>
>> The AssociateArray stuct has semantic run on it with errors gagged.
>> Spot the error in the line above!
> [...]
>
> Ah, that's why I'm getting weird error messages. Silly mistake, should
> be string file=__FILE__. :-)
>
> Why are errors gagged in this case tho?
>
>

(I think) because in most cases when semantic on AssocitiveArray fails, it's 
because the user tried to create an invalid AA and error messages for it 
should have already been issued.  Eg an AA of type void[void] wouldn't 
compile, but error messages from the struct in object.d would just be 
confusing noise. 




More information about the Digitalmars-d mailing list