Bug 21247 – AssertArguments should allow for tuple auto expansion

Status
NEW
Severity
enhancement
Priority
P4
Component
dmd
Product
D
Version
D2
Platform
All
OS
All
Creation time
2020-09-14T07:50:08Z
Last change time
2024-12-13T19:11:29Z
Assigned to
No Owner
Creator
Nicholas Wilson
Moved to GitHub: dmd#19785 →

Comments

Comment #0 by iamthewilsonator — 2020-09-14T07:50:08Z
alias AliasSeq(T...) = T; template check(T) { alias check = AliasSeq!(false, "foo"); } static assert(check!int); void main(){assert(check!int);} void func() in(check!int) {} results in Error: expression tuple(false, "foo") of type (bool, string) does not have a boolean value onlineapp.d(7): while evaluating: static assert(check!int) Error: expression tuple(false, "foo") of type (bool, string) does not have a boolean value Error: expression tuple(false, "foo") of type (bool, string) does not have a boolean value Expected outcome: static and runtime assertion failures with message "foo"
Comment #1 by robert.schadek — 2024-12-13T19:11:29Z
THIS ISSUE HAS BEEN MOVED TO GITHUB https://github.com/dlang/dmd/issues/19785 DO NOT COMMENT HERE ANYMORE, NOBODY WILL SEE IT, THIS ISSUE HAS BEEN MOVED TO GITHUB