[Issue 7700] wrong semantic scope while ordering parameterized specialization

d-bugmail at puremagic.com d-bugmail at puremagic.com
Tue Mar 13 06:42:41 PDT 2012


http://d.puremagic.com/issues/show_bug.cgi?id=7700



--- Comment #1 from dawg at dawgfoto.de 2012-03-13 06:42:51 PDT ---
cat > bug.d << CODE
template foo(short lo2, short hi2 : lo2) {}
template foo(byte lo, byte hi : lo) {}

alias foo!(0, 0) foo00;
CODE

dmd -c bug

--------
bug.d(4): Error: undefined identifier lo, did you mean variable lo2?
bug.d(2): Error: undefined identifier lo2, did you mean variable lo?
bug.d(8): Error: template instance foo!(0,0) foo!(0,0) matches more than one
template declaration, bug.d(2):foo(short lo2,short hi2 : lo2) and
bug.d(4):foo(byte lo,byte hi : lo)
--------

There was a typo in the previous code example.

-- 
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------


More information about the Digitalmars-d-bugs mailing list