Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion compiler/src/dmd/templatesem.d
Original file line number Diff line number Diff line change
Expand Up @@ -2778,7 +2778,9 @@ private MATCH matchArg(TemplateParameter tp, Scope* sc, RootObject oarg, size_t
if (!sa || si != sa)
return matchArgNoMatch();
}
dedtypes[i] = sa;
// Note: Dsymbol can't have type qualifiers, so use type if it has them
// https://github.com/dlang/dmd/issues/17959
dedtypes[i] = ta && ta.mod ? ta : sa;

if (psparam)
{
Expand Down
7 changes: 7 additions & 0 deletions compiler/test/compilable/alias_param_qual.d
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
alias t(alias a) = a;

static assert(is(t!(const Object) == const Object));
static assert(is(t!(shared(Object)) == shared Object));
static assert(is(t!(immutable S) == immutable(S)));

struct S {}
Loading