October 05, 2017 [Issue 17879] New: UFCS can enable some forms of hijacking | ||||
---|---|---|---|---|
| ||||
https://issues.dlang.org/show_bug.cgi?id=17879 Issue ID: 17879 Summary: UFCS can enable some forms of hijacking Product: D Version: D2 Hardware: All OS: All Status: NEW Severity: enhancement Priority: P1 Component: dmd Assignee: nobody@puremagic.com Reporter: bugzilla@digitalmars.com >From Timon Gehr: struct S{ // string foo(){ return "hijacked!"; } // uncomment to hijack } string foo(S s){ return "not hijacked!"; } void main(){ S s; import std.stdio; writeln(s.foo()); } -- |
Copyright © 1999-2021 by the D Language Foundation