[Issue 17879] New: UFCS can enable some forms of hijacking
d-bugmail at puremagic.com
d-bugmail at puremagic.com
Thu Oct 5 19:42:19 UTC 2017
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 at puremagic.com
Reporter: bugzilla at 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());
}
--
More information about the Digitalmars-d-bugs
mailing list