digitalmars.D.bugs - [Issue 13296] New: User defined types matches typed template rather
- via Digitalmars-d-bugs (36/36) Aug 15 2014 https://issues.dlang.org/show_bug.cgi?id=13296
https://issues.dlang.org/show_bug.cgi?id=13296 Issue ID: 13296 Summary: User defined types matches typed template rather than aliased as best match Product: D Version: D2 Hardware: x86_64 OS: Linux Status: NEW Severity: regression Priority: P1 Component: Phobos Assignee: nobody puremagic.com Reporter: simendsjo gmail.com This is a change in master. I find the new behavior more consistent and better than the previous, but it might be a regression rather than a bugfix (by bugzilla-fu isn't very good). In 2.065, passing a user-defined type would match an alias parameter before a type parameter. See the following example. The following code prints 2.065: T int, alias S 2.066: T int, T S template t(T) { pragma(msg, "T ", T.stringof); alias t = T; } template t(alias T) { pragma(msg, "alias ", T.stringof); alias t = T; } void main() { struct S {} t!int i; // 2.065: T, 2.066: T t!S s; // 2.065: alias, 2.066: T } --
Aug 15 2014