http://d.puremagic.com/issues/show_bug.cgi?id=11157
Summary: base class member hides template parameter
Product: D
Version: D2
Platform: All
OS/Version: All
Status: NEW
Severity: normal
Priority: P2
Component: DMD
AssignedTo: [email protected]
ReportedBy: [email protected]
--- Comment #0 from Martin Nowak <[email protected]> 2013-10-02 10:46:47 PDT ---
cat > bug.d << CODE
class Base
{
int param;
}
class Foo(int param) : Base
{
int val()
{
return param; // <-- param refers to super.param
}
}
unittest
{
auto foo = new Foo!12;
assert(foo.val() == 12);
}
CODE
dmd -unittest -main -run bug
----
--
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------