[Issue 23578] New: Types are not matched to alias parameters in "is" expression
d-bugmail at puremagic.com
d-bugmail at puremagic.com
Sat Dec 24 08:31:39 UTC 2022
https://issues.dlang.org/show_bug.cgi?id=23578
Issue ID: 23578
Summary: Types are not matched to alias parameters in "is"
expression
Product: D
Version: D2
Hardware: All
OS: All
Status: NEW
Severity: normal
Priority: P1
Component: dmd
Assignee: nobody at puremagic.com
Reporter: maxsamukha at gmail.com
struct S(alias a)
{
}
static if (is(S!int == S!a, alias a))
pragma(msg, a);
else
static assert(false);
Output:
onlineapp.d(4): Error: static assert: `false` is false
I don't know whether it's a bug or enhancement. The spec is unclear on this. It
is reasonable to expect 'alias' parameters in 'is' expressions to be treated
consistently with template parameters.
--
More information about the Digitalmars-d-bugs
mailing list