[Issue 17882] [The D Style] unittest attributes
https://issues.dlang.org/show_bug.cgi?id=17882 Basile-z changed: What|Removed |Added CC|b2.t...@gmx.com | --
[Issue 17882] [The D Style] unittest attributes
https://issues.dlang.org/show_bug.cgi?id=17882 b2.t...@gmx.com changed: What|Removed |Added Status|REOPENED|RESOLVED Resolution|--- |INVALID --- Comment #4 from b2.t...@gmx.com --- (In reply to Mario Kroeplin from comment #3) > (In reply to b2.temp from comment #2) > > The issue is just the wording of the guideline: > "to ensure the existence of attributes on the templated function": > which "templated function"? in the example it's "call2". Maybe if you're not comfy enough with D try https://forum.dlang.org/group/learn before opening an issue. --
[Issue 17882] [The D Style] unittest attributes
https://issues.dlang.org/show_bug.cgi?id=17882 Mario Kroeplinchanged: What|Removed |Added Status|RESOLVED|REOPENED Resolution|INVALID |--- --- Comment #3 from Mario Kroeplin --- (In reply to b2.temp from comment #2) The issue is just the wording of the guideline: "to ensure the existence of attributes on the templated function": which "templated function"? --
[Issue 17882] [The D Style] unittest attributes
https://issues.dlang.org/show_bug.cgi?id=17882 --- Comment #2 from b2.t...@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. } --
[Issue 17882] [The D Style] unittest attributes
https://issues.dlang.org/show_bug.cgi?id=17882 b2.t...@gmx.com changed: What|Removed |Added Status|NEW |RESOLVED CC||b2.t...@gmx.com Resolution|--- |INVALID --- Comment #1 from b2.t...@gmx.com --- attributes of the unittest blocks are tried on the free functions that are used inside. Actually you can see a unittest{} as a function itself. (the getunittests traits returns some void function()). --