A proposal for better template constraint error reporting.

Gor Gyolchanyan gor.f.gyolchanyan at gmail.com
Wed Oct 26 10:15:59 PDT 2011


The first version looks better and the compiler should output the
comment when the unittest fails.
I think all error comments should be marked in a special way to avoid
undesired effects.

On Wed, Oct 26, 2011 at 9:10 PM, bearophile <bearophileHUGS at lycos.com> wrote:
> Gor Gyolchanyan:
>
>> The ddoc comments, preceding parts of template constraints would be
>> used to specify why exactly did the template fail to instantiate, for
>> example:
>
> Good. Is it possible to do the same thing with unittests?
>
> /// foo
> unittest {
>  assert(false);
> }
>
> ==>
> foo unittest failed
>
>
> But maybe this syntax is better:
>
> unittest(foo) {
>  assert(false);
> }
>
> Bye,
> bearophile
>


More information about the Digitalmars-d mailing list