fix Issue 16667 - wrong @safe unittest compilation error#4905
fix Issue 16667 - wrong @safe unittest compilation error#4905mihails-strasuns merged 2 commits intodlang:stablefrom
Conversation
|
std/conv.d
Outdated
| // instantiate the documenting unittest in the castFrom template | ||
| unittest | ||
| { | ||
| alias castFromI = castFrom!long; |
There was a problem hiding this comment.
Have you chosen this approach because of DDOC issues? Normally it would be better to completely move tets block outside of template to minimize bloat as it does't use any of template arguments anyway.
There was a problem hiding this comment.
Yes, can't we just move the unittest outside? I think it will just document the "castFrom" template instead of the "to" member, but that should be fine.
There was a problem hiding this comment.
None of my business to change the docs of that function, just fixing the regression here.
There was a problem hiding this comment.
Move the test anyhow.
|
Auto-merge toggled on |
| } | ||
|
|
||
| // https://issues.dlang.org/show_bug.cgi?id=16667 | ||
| unittest |
There was a problem hiding this comment.
@MartinNowak this test should be explicitly tagged with either @safe or @system, to clarify the intended safety-ness.
No description provided.