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

adds assert messages to std.container.dlist #7191

Merged
merged 1 commit into from
Sep 20, 2019

Conversation

burner
Copy link
Member

@burner burner commented Sep 20, 2019

No description provided.

@dlang-bot
Copy link
Contributor

Thanks for your pull request, @burner!

Bugzilla references

Your PR doesn't reference any Bugzilla issue.

If your PR contains non-trivial changes, please reference a Bugzilla issue or create a manual changelog.

Testing this PR locally

If you don't have a local development environment setup, you can use Digger to test this PR:

dub fetch digger
dub run digger -- build "master + phobos#7191"

@dlang-bot dlang-bot merged commit 0855e34 into dlang:master Sep 20, 2019
@@ -222,12 +222,12 @@ struct DList(T)
}
ref inout(BaseNode*) _first() @property @safe nothrow pure inout
{
assert(_root);
assert(_root, "Root pointer most not be null");
Copy link
Member

Choose a reason for hiding this comment

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

Typo: must

return _root._next;
}
ref inout(BaseNode*) _last() @property @safe nothrow pure inout
{
assert(_root);
assert(_root, "Root pointer most not be null");
Copy link
Member

Choose a reason for hiding this comment

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

Ditto

@@ -286,7 +286,8 @@ elements in `rhs`.
*/
struct Range
{
static assert(isBidirectionalRange!Range);
static assert(isBidirectionalRange!Range,
"Range is not a bidirectional range");
Copy link
Member

Choose a reason for hiding this comment

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

Do we really need a message ? static assert print their failing condition.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants