Add error message for static assert in bitmanip.d#6282
Add error message for static assert in bitmanip.d#6282dlang-bot merged 1 commit intodlang:masterfrom
Conversation
|
Thanks for your pull request and interest in making D better, @crimaniak! We are looking forward to reviewing it, and you should be hearing from a maintainer soon.
Please see CONTRIBUTING.md for more information. If you have addressed all reviews or aren't sure how to proceed, don't hesitate to ping us with a simple comment. Bugzilla referencesYour PR doesn't reference any Bugzilla issue. If your PR contains non-trivial changes, please reference a Bugzilla issue or create a manual changelog. |
std/bitmanip.d
Outdated
| static if (is(T == bool)) | ||
| { | ||
| static assert(len == 1); | ||
| static assert(len == 1, "'"~name~"' definition problem: type 'bool' is allowed only for single-bit fields"); |
There was a problem hiding this comment.
fixed, but in fact, this file has complete anarchy.
There was a problem hiding this comment.
Yes we try to gradually create consistency whenever it comes up. Though there's the idea of using dfmt to format the git diff automatically.
|
So we use backticks since a while for colorized output. So it would be great to use them here as well instead of the normal single quotes. Also don't forget to squash everything into one commit (though we could do that for you if you run into problems) Thanks. |
|
Backticks work for static assert? I thought it was only for DMD's messages? |
|
Sorry guys, I can not find the documentation. Where can I read, how and in what messages do the backticks work? |
|
I don't know of any documentation documenting this :/ |
|
About squashing: I read some documentation but I never did it before, only local before any push, so this time it will better if you just use merge with squashing. |
|
So I squashed everything for you and split the message in two lines as it was over 120 chars (the reason for the CircleCI failure). edit: and changed the wording slightly as "only" is an adverb and should be after the first auxiliary verb): https://dictionary.cambridge.org/grammar/british-grammar/adjectives/only |
Static assert, checking the number of bits for a field with the type bool, did not have an error message.
|
Thanks for fixing my commit and message text! (I am not native English speaker). |
|
I think that’s true for half of the D contributors :) |
|
... even for myself ;-) |
Static assert, checking the number of bits for a field with the type
bool, did not have an error message.