Bug 16403 – wrong "matches more than one template declaration" error with template specialization on alias parameters

Status
NEW
Severity
normal
Priority
P3
Component
dmd
Product
D
Version
D2
Platform
All
OS
All
Creation time
2016-08-18T22:40:29Z
Last change time
2024-12-13T18:49:30Z
Keywords
rejects-valid
Assigned to
No Owner
Creator
ag0aep6g
Moved to GitHub: dmd#19171 →

Comments

Comment #0 by ag0aep6g — 2016-08-18T22:40:29Z
---- struct S(T) {} /* This should work, but fails: */ enum fails(alias Tmpl, alias Inst : Tmpl!A, A) = true; enum fails(alias Tmpl, alias Inst) = false; static assert(fails!(S, S!int)); /* Error: template test.fails matches more than one template declaration */ /* These variations work: */ enum works1(alias Inst : S!A, A) = true; enum works1(alias Inst) = false; static assert(works1!(S!int)); /* passes */ enum works2(alias Tmpl, Inst : Tmpl!A, A) = true; enum works2(alias Tmpl, Inst) = false; static assert(works2!(S, S!int)); /* passes */ ----
Comment #1 by robert.schadek — 2024-12-13T18:49:30Z
THIS ISSUE HAS BEEN MOVED TO GITHUB https://github.com/dlang/dmd/issues/19171 DO NOT COMMENT HERE ANYMORE, NOBODY WILL SEE IT, THIS ISSUE HAS BEEN MOVED TO GITHUB