[Issue 6679] New: parameter with default value allows to override final interface method
d-bugmail at puremagic.com
d-bugmail at puremagic.com
Thu Sep 15 18:22:04 PDT 2011
http://d.puremagic.com/issues/show_bug.cgi?id=6679
Summary: parameter with default value allows to override final
interface method
Product: D
Version: D2
Platform: All
OS/Version: All
Status: NEW
Keywords: accepts-invalid
Severity: normal
Priority: P2
Component: DMD
AssignedTo: nobody at puremagic.com
ReportedBy: mrmocool at gmx.de
--- Comment #0 from Trass3r <mrmocool at gmx.de> 2011-09-15 18:21:42 PDT ---
(based on a TDPL example)
import std.stdio;
interface I
{
final void foo() {writeln(-1);}
}
class F : I
{
void foo(int i = 0)
{
writeln(i);
}
}
void main()
{
F f = new F;
f.foo(); // prints 0
}
--
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