"Torarin" <torar...@gmail.com> wrote in message news:mailman.37.1283370434.858.digitalmar...@puremagic.com... > It says: "If a.fun(b, c, d) is seen but fun is not a member of a's > type, D rewrites that as fun(a, b, c, d) and tries that as well." > So I guess it's possible it won't work with numerical types because > they can never have members. >
That's not the way I interpret that. If 'a' is a numeric primitive type and can never have members, then 'fun' can never be a member of 'a', therefore the rewritten version should always get tried. Unfortunately, at the moment, D2 is actually a little *further* from that universal ideal than D1 is: "Regression(2.020) Array member call syntax can't find matches in current class" http://d.puremagic.com/issues/show_bug.cgi?id=4525 When I converted some D1 code to D2 recently, I actually had to *remove* many of my array-member-call-syntax calls because of that bug.