http://d.puremagic.com/issues/show_bug.cgi?id=3526
Summary: Mixin of member function not overriden by enclosing
scope
Product: D
Version: 2.036
Platform: x86
OS/Version: Windows
Status: NEW
Severity: normal
Priority: P2
Component: DMD
AssignedTo: [email protected]
ReportedBy: [email protected]
--- Comment #0 from Tomasz SowiĆski <[email protected]> 2009-11-19 10:22:45
PST ---
interface Foo {
public int foo();
}
template fooImpl() {
public override int foo() { return 4; }
}
class Goo : Foo {
mixin fooImpl!();
public override int foo() { return 7; }
}
void main() {
Foo f = new Goo;
assert (f.foo == 7);
}
The above assert fails. Problem is the declaration order matters -- when the
mixin comes AFTER the hand-coded foo(), it's fine.
--
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------