Bug 17378 – Allow multiple arguments for assert and static assert
Status
RESOLVED
Resolution
FIXED
Severity
enhancement
Priority
P4
Component
dmd
Product
D
Version
D2
Platform
All
OS
Linux
Creation time
2017-05-07T09:19:46Z
Last change time
2022-12-19T14:06:55Z
Keywords
pull
Assigned to
No Owner
Creator
Ali Cehreli
Comments
Comment #0 by acehreli — 2017-05-07T09:19:46Z
This is for consistency with pragma(msg) and developer and build efficiency (because std.string.format would not be needed anymore).
void main() {
pragma(msg, "hi ", 42);
// static assert(false, "wat ", 43);
// assert(false, "why ", 44);
}
The commented-out lines should be compilable and output "wat 43" and "why 44" respectively.
Ali
Comment #1 by razvan.nitu1305 — 2021-03-16T08:14:52Z
*** Issue 21715 has been marked as a duplicate of this issue. ***
Comment #2 by dlang-bot — 2022-11-02T13:42:01Z
@ntrel created dlang/dmd pull request #14611 "Allow multiple message arguments for static assert" fixing this issue:
- Fix Issue 17378 - Allow multiple message arguments for static assert
Rebase #11757.
initial implementation
ws
ws
fix compileable1 test case
fix
update frontend.h
fix astbase
take two
https://github.com/dlang/dmd/pull/14611
Comment #3 by dlang-bot — 2022-12-19T14:06:55Z
dlang/dmd pull request #14611 "Allow multiple message arguments for static assert" was merged into master:
- 1f9bc7d78aa34e2c6fbd84901d6558829d3e1127 by Nicholas Wilson:
Fix Issue 17378 - Allow multiple message arguments for static assert
Rebase #11757.
initial implementation
ws
ws
fix compileable1 test case
fix
update frontend.h
fix astbase
take two
https://github.com/dlang/dmd/pull/14611