Skip to content
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

Merged
merged 2 commits into from
Nov 20, 2016

Conversation

MartinNowak
Copy link
Member

No description provided.

@dlang-bot
Copy link
Contributor

Fix Bugzilla Description
16667 [REG] dub test fails on std.conv after upgrade to dmd 2.072.0

// instantiate the documenting unittest in the castFrom template
unittest
{
alias castFromI = castFrom!long;

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.

Copy link
Member

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.

Copy link
Member Author

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.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Move the test anyhow.

@mihails-strasuns
Copy link

Auto-merge toggled on

@mihails-strasuns mihails-strasuns merged commit 2a6b436 into dlang:stable Nov 20, 2016
}
}

// https://issues.dlang.org/show_bug.cgi?id=16667
unittest
Copy link
Member

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.

@MartinNowak MartinNowak deleted the fix16667 branch August 30, 2022 06:10
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants