Bug 13500 – Wrong ambiguity error in second template instantiation

Status
NEW
Severity
enhancement
Priority
P4
Component
dmd
Product
D
Version
D2
Platform
x86_64
OS
Linux
Creation time
2014-09-20T03:13:24Z
Last change time
2024-12-13T18:27:48Z
Assigned to
No Owner
Creator
timon.gehr
Moved to GitHub: dmd#18885 →

Comments

Comment #0 by timon.gehr — 2014-09-20T03:13:24Z
With DMD 2.066.0, this compiles with version=A or version=B, but noth with both simultaneously: import std.typecons; mixin template WorkingTypedef(string i,T,T init=T.init)/+if(...)+/{ mixin Typedef!(T,init); mixin(`alias `~i~` =Typedef;`); } version(A) mixin WorkingTypedef!("Name2",int,2); version(B) mixin WorkingTypedef!("Name1",int); The code should compile in all three cases.
Comment #1 by robert.schadek — 2024-12-13T18:27:48Z
THIS ISSUE HAS BEEN MOVED TO GITHUB https://github.com/dlang/dmd/issues/18885 DO NOT COMMENT HERE ANYMORE, NOBODY WILL SEE IT, THIS ISSUE HAS BEEN MOVED TO GITHUB