Bug 21282 – mixin of AliasSeq "cannot alias an expression"

Status
RESOLVED
Resolution
FIXED
Severity
regression
Priority
P1
Component
dmd
Product
D
Version
D2
Platform
All
OS
All
Creation time
2020-09-29T00:02:20Z
Last change time
2020-11-16T00:10:06Z
Keywords
pull
Assigned to
No Owner
Creator
Adam D. Ruppe

Comments

Comment #0 by destructionator — 2020-09-29T00:02:20Z
--- template I(T...) { alias I = T; } template Bug(T...) { alias Bug = mixin("I!(T[0])"); } void func() {} pragma(msg, Bug!func); --- bugr.d(4): Error: alias bugr.Bug!(func).Bug cannot alias an expression tuple(func) bugr.d(7): Error: template instance bugr.Bug!(func) error instantiating bugr.d(7): while evaluating pragma(msg, Bug!(func)) If you remove the `mixin` it works, so it isn't a fundamental limitation, something is lost through the mixin layer. This was broken in this version: https://dlang.org/changelog/2.089.1.html My gut suspicion is it has to do with the fix to https://issues.dlang.org/show_bug.cgi?id=20431 but I don't actually know.
Comment #1 by dlang-bot — 2020-09-29T05:35:42Z
@WalterBright created dlang/dmd pull request #11810 "fix Issue 21282 mixin of AliasSeq cannot alias an expression" fixing this issue: - fix Issue 21282 mixin of AliasSeq cannot alias an expression https://github.com/dlang/dmd/pull/11810
Comment #2 by dlang-bot — 2020-09-29T09:20:07Z
@BorisCarvajal created dlang/dmd pull request #11814 "Fix Issue 21282 - mixin of AliasSeq "cannot alias an expression"" fixing this issue: - Fix Issue 21282 - mixin of AliasSeq "cannot alias an expression" https://github.com/dlang/dmd/pull/11814
Comment #3 by dlang-bot — 2020-09-30T07:36:28Z
dlang/dmd pull request #11814 "Fix Issue 21282 - mixin of AliasSeq "cannot alias an expression"" was merged into stable: - 7bfa099162076e12c027b27a991bd7606a9c0541 by Boris Carvajal: Fix Issue 21282 - mixin of AliasSeq "cannot alias an expression" https://github.com/dlang/dmd/pull/11814
Comment #4 by dlang-bot — 2020-10-18T03:23:21Z
dlang/dmd pull request #11845 "merge stable" was merged into master: - 79cb552da52c71fea2cc4f29969d04ae561af024 by Boris Carvajal: Fix Issue 21282 - mixin of AliasSeq "cannot alias an expression" (#11814) https://github.com/dlang/dmd/pull/11845
Comment #5 by dlang-bot — 2020-11-16T00:10:06Z
dlang/dmd pull request #11961 "merge stable" was merged into master: - f2192d943cb948575c8b4216752f0244f585a1de by Boris Carvajal: Fix Issue 21282 - mixin of AliasSeq "cannot alias an expression" (#11814) https://github.com/dlang/dmd/pull/11961