October 05, 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@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());
}

--