AssociativeArray.opIndex

Jonathan M Davis jmdavisProg at gmx.com
Sat Mar 3 11:57:46 PST 2012


On Saturday, March 03, 2012 22:50:10 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!

There are two of them, not one. file is supposed to be a string, and line 
should be a size_t - though in this particular case, using int for line 
probably won't result in a compilation error. It's still not correct though - 
especially when you end up in situations where someone actually gives an 
argument to line rather than letting it be the default.

- Jonathan M Davis


More information about the Digitalmars-d mailing list