playing around with D
Don Clugston
dac at nospam.com.au
Wed Mar 7 00:00:02 PST 2007
Walter Bright wrote:
> BCS wrote:
>> Why do the static asserts get processed later?
>>
>> I'd expect that having them get processed sooner would make things
>> work nicer.
>
> There's always that chicken-and-egg problem of forward references.
Given how common static assert(0) is, I wonder if something could be
done to improve the error message quality in the
"static assert(0, "xxx")" case?
file.d(58): static assert (0) is false, "xxx"
Maybe drop out the "(0) is false" bit, since it doesn't seem to add much
value, changing it to something like:
file.d(58): static assert, "xxx"
Or even drop the 'static assert' bit entirely, and just display "xxx".
More information about the Digitalmars-d
mailing list