[Issue 3526] New: Mixin of member function not overriden by enclosing scope
d-bugmail at puremagic.com
d-bugmail at puremagic.com
Thu Nov 19 10:22:45 PST 2009
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: nobody at puremagic.com
ReportedBy: tomeksowi at gmail.com
--- Comment #0 from Tomasz Sowiński <tomeksowi at gmail.com> 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: -------
More information about the Digitalmars-d-bugs
mailing list