Bug 7023 – alias to overload set in template doesn't work

Status
RESOLVED
Resolution
FIXED
Severity
normal
Priority
P2
Component
dmd
Product
D
Version
D2
Platform
All
OS
All
Creation time
2011-11-27T16:25:27Z
Last change time
2018-04-20T08:48:31Z
Keywords
rejects-valid
Assigned to
No Owner
Creator
Trass3r

Comments

Comment #0 by hoganmeier — 2011-11-27T16:25:27Z
template One(T) { alias _One!T.foo One; } template _One(T) { void foo(int i) {} void foo(long l) {} } void main() { long i = 5; One!float(555555555555555555L); } Error: cannot implicitly convert expression (555555555555555555L) of type long to int i.e. it doesn't recognize the second foo at all. bug or feature?
Comment #1 by timon.gehr — 2011-11-27T17:44:58Z
definitely a bug.
Comment #2 by k.hara.pg — 2013-01-08T20:53:52Z
Works in 2.061, at least.
Comment #3 by simen.kjaras — 2018-04-20T08:48:31Z
Works in 2.079.1, and according to comment 2 seems to have worked for 2.061. Feel free to reopen if it's found to still be a problem.