[Issue 3759] Implementing two interfaces with same final function is accepted
d-bugmail at puremagic.com
d-bugmail at puremagic.com
Sun Jan 31 17:14:50 PST 2010
http://d.puremagic.com/issues/show_bug.cgi?id=3759
Mike Parker <aldacron at gmail.com> changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |aldacron at gmail.com
--- Comment #1 from Mike Parker <aldacron at gmail.com> 2010-01-31 17:14:48 PST ---
According to TDPL, the solution *should* be the following:
---
void main() {
X x = new X();
x.foo(); // prints "One"
x.Two.foo(); // should print "Two"
Y y = new Y();
y.foo(); // prints "Two"
y.One.foo(); // should print "One"
}
---
But this gives the following errors:
ifinal.d(28): Error: no property 'Two' for type 'ifinal.X'
Error: no property 'foo' for type 'int'
ifinal.d(28): Error: function expected before (), not __error of type int
ifinal.d(31): Error: no property 'One' for type 'ifinal.Y'
Error: no property 'foo' for type 'int'
ifinal.d(31): Error: function expected before (), not __error of type int
--
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