Bug 6679 – Parameter with default value allows hijacking of final interface method

Status
NEW
Severity
normal
Priority
P3
Component
dmd
Product
D
Version
D2
Platform
All
OS
All
Creation time
2011-09-15T18:21:42Z
Last change time
2024-12-13T17:56:26Z
Keywords
accepts-invalid
Assigned to
No Owner
Creator
Trass3r
Moved to GitHub: dmd#18370 →

Comments

Comment #0 by hoganmeier — 2011-09-15T18:21:42Z
(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 }
Comment #1 by robert.schadek — 2024-12-13T17:56:26Z
THIS ISSUE HAS BEEN MOVED TO GITHUB https://github.com/dlang/dmd/issues/18370 DO NOT COMMENT HERE ANYMORE, NOBODY WILL SEE IT, THIS ISSUE HAS BEEN MOVED TO GITHUB