Should we add `a * b` for vectors?

Walter Bright newshound2 at digitalmars.com
Thu Oct 5 19:44:51 UTC 2017


On 10/5/2017 4:26 AM, Timon Gehr wrote:
>>> UFCS allows hijacking. For an example, see:
>>> https://github.com/tgehr/d-compiler/pull/1#discussion-diff-89697186L85
>>
>> That may be a bug in the compiler. Can you produce a small test case?
> 
> 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());
> }

Thank you:

  https://issues.dlang.org/show_bug.cgi?id=17879


More information about the Digitalmars-d mailing list