http://d.puremagic.com/issues/show_bug.cgi?id=7837
Summary: A refused opBinaryRight("in") with bad error message Product: D Version: D2 Platform: x86 OS/Version: Windows Status: NEW Keywords: diagnostic, rejects-valid Severity: normal Priority: P2 Component: DMD AssignedTo: nob...@puremagic.com ReportedBy: bearophile_h...@eml.cc --- Comment #0 from bearophile_h...@eml.cc 2012-04-05 17:49:50 PDT --- immutable struct Foo { bool opBinaryRight(string op="in")(int x) { return true; } } void main() { assert(5 in Foo()); } DMD 2.059beta gives: test.d(7): Error: rvalue of in expression must be an associative array, not Foo If this isn't a bug (maybe caused by fixing Issue 7038 ), then this issue is a diagnostic enhancement request for a better error message :-) -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email ------- You are receiving this mail because: -------