[Issue 8616] Make pointers dereference with UFCS like they do with	member functions
    d-bugmail at puremagic.com 
    d-bugmail at puremagic.com
       
    Mon Sep  3 23:26:18 PDT 2012
    
    
  
http://d.puremagic.com/issues/show_bug.cgi?id=8616
--- Comment #4 from Jonathan M Davis <jmdavisProg at gmx.com> 2012-09-03 23:26:55 PDT ---
> However, there is still a question what to do when both function are available
I'd definitely choose to go with making the code not compile. Otherwise, it
risks function hijacking. You could have
auto foo(S s) {...}
in my.pack which
S* s;
s.foo();
is happily calling, and then when you change the code to import your.pack with
auto foo(S* s) {...}
the code would silently change which function was being called. In general, we
try and make all such situations compilation errors in D.
-- 
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