[Issue 7700] New: wrong semantic scope while ordering parameterized specialization
d-bugmail at puremagic.com
d-bugmail at puremagic.com
Tue Mar 13 05:14:34 PDT 2012
http://d.puremagic.com/issues/show_bug.cgi?id=7700
Summary: wrong semantic scope while ordering parameterized
specialization
Product: D
Version: D2
Platform: All
OS/Version: All
Status: NEW
Severity: normal
Priority: P2
Component: DMD
AssignedTo: nobody at puremagic.com
ReportedBy: dawg at dawgfoto.de
--- Comment #0 from dawg at dawgfoto.de 2012-03-13 05:14:43 PDT ---
cat > bug.d << CODE
template foo(short lo2, short hi2 : lo) {}
template foo(byte lo, byte hi : lo) {}
alias foo!(0, 0) foo00;
CODE
dmd -c bug
--------
bug.d(2): Error: undefined identifier lo, did you mean variable lo2?
--------
Both templates are match with conversion.
During ordering the first template is instantiated
with foo!(0, lo) and semantic is run in the wrong scope.
It seems that we need to create a scope and run semantic
while creating the dummy args.
--
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