October 02, 2013 [Issue 11157] New: base class member hides template parameter | ||||
---|---|---|---|---|
| ||||
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: nobody@puremagic.com ReportedBy: code@dawg.eu --- Comment #0 from Martin Nowak <code@dawg.eu> 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: ------- |
Copyright © 1999-2021 by the D Language Foundation