[Issue 17882] [The D Style] unittest attributes
d-bugmail at puremagic.com
d-bugmail at puremagic.com
Sat Oct 7 11:58:02 UTC 2017
https://issues.dlang.org/show_bug.cgi?id=17882
--- Comment #2 from b2.temp at gmx.com ---
to be perfectly clear about the invalidity, see:
https://dlang.org/spec/function.html#function-attribute-inference
void call1 () @safe{} // non templatized so no attrib inference
void call2 ()(){} // attrib infered by the caller
@safe unittest
{
// everything inside **must** be safe or trused.
call1();
call2();
}
//is like
void test() @safe
{
call1();
call2(); // @safe is infered on call2, so that if not supported compil stops.
}
--
More information about the Digitalmars-d-bugs
mailing list