D issues are now tracked on GitHub. This Bugzilla instance remains as a read-only archive.
Issue 15923 - is expression qualifier matching does not work with multiple qualifiers
Summary: is expression qualifier matching does not work with multiple qualifiers
Status: RESOLVED WORKSFORME
Alias: None
Product: D
Classification: Unclassified
Component: dmd (show other issues)
Version: D2
Hardware: x86_64 Linux
: P1 normal
Assignee: No Owner
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2016-04-14 03:08 UTC by Andrei Alexandrescu
Modified: 2022-11-07 09:26 UTC (History)
1 user (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this issue.
Description Andrei Alexandrescu 2016-04-14 03:08:57 UTC
Consider:

alias T = shared(const int);
static if (is(T == shared(U), U))
	pragma(msg, "works");
else
	static assert(0, "does not work");

This fails to compile. The compiler should peel the "shared" and bind U to const int. This code does work:

alias T = shared(const int);
static if (is(T == shared(const(U)), U))
	pragma(msg, "works");
else
	static assert(0, "does not work");
Comment 1 RazvanN 2022-11-07 09:26:35 UTC
I cannot reproduce this. Running the first version of the code yields "works". This seems to have been fixed.