[Issue 5558] opIn_r not detected as method for 'in' in pointed struct

d-bugmail at puremagic.com d-bugmail at puremagic.com
Thu Feb 10 13:30:53 PST 2011


http://d.puremagic.com/issues/show_bug.cgi?id=5558



--- Comment #3 from Denis Derman <denis.spir at gmail.com> 2011-02-10 13:28:26 PST ---
(In reply to comment #2)
> Actually, I feel that it should work on both sides.  The spec states that the
> compiler rewrites for example "a + b" as:
> 
> try a.opBinary!("+")(b), see if it compiles, if not, try
> b.opBinaryRight!("+")(a).
> 
> Since the dot operator automatically dereferences, I think it should also in
> this case after the rewrite.

And unlike opBinary, opIn_r so-to-say says "as right operand", so the compiler
has no excuse ;-) (And does not need to try both possibilities.)

Denis

-- 
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