-
-
Notifications
You must be signed in to change notification settings - Fork 706
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
fix Issue 16667 - wrong @safe unittest compilation error #4905
Conversation
|
| // instantiate the documenting unittest in the castFrom template | ||
| unittest | ||
| { | ||
| alias castFromI = castFrom!long; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
None of my business to change the docs of that function, just fixing the regression here.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@MartinNowak this test should be explicitly tagged with either @safe or @system, to clarify the intended safety-ness.
No description provided.