On Mon, Mar 1, 2010 at 17:26, Norbert Nemec <[email protected]> wrote:
> Thanks, Philippe, for the elegant workaround! > De nada. I vaguely remembered being confronted by this one, but didn't know it was a bug (my code wasn't as clear as yours). I now realize that my coding in D is a least partially made of such tricks. > > Still I would like to know the reason for my original failure, especially > since the compiler error message did not contain any line number whatsoever. > Getting this kind of error message in a large project must be really ugly to > solve, even if the workaround is so straightforward... > What bugs (!) me is that a+(b+c) didn't create an error, whereas (a+b)+c did... I first tried to define opAdd_r so that the compiler could try c.opAdd_r((a+b)), but to no avail... As for the line numbers, yes it's hard and it's reason enough to put this on bugzilla. Maybe even as 2 different tickets. I remember having other incomplete error messages some days ago. I should strive to note them and put them on puremagic. Philippe
