[Issue 21247] New: AssertArguments should allow for tuple auto expansion
d-bugmail at puremagic.com
d-bugmail at puremagic.com
Mon Sep 14 07:50:08 UTC 2020
https://issues.dlang.org/show_bug.cgi?id=21247
Issue ID: 21247
Summary: AssertArguments should allow for tuple auto expansion
Product: D
Version: D2
Hardware: All
OS: All
Status: NEW
Severity: enhancement
Priority: P1
Component: dmd
Assignee: nobody at puremagic.com
Reporter: iamthewilsonator at hotmail.com
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"
--
More information about the Digitalmars-d-bugs
mailing list