[Issue 9857] New: UFCS for struct opCall

d-bugmail at puremagic.com d-bugmail at puremagic.com
Tue Apr 2 04:10:37 PDT 2013


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

           Summary: UFCS for struct opCall
           Product: D
           Version: D2
          Platform: x86
        OS/Version: Windows
            Status: NEW
          Keywords: rejects-valid
          Severity: normal
          Priority: P2
         Component: DMD
        AssignedTo: nobody at puremagic.com
        ReportedBy: bearophile_hugs at eml.cc


--- Comment #0 from bearophile_hugs at eml.cc 2013-04-02 04:10:36 PDT ---
Maybe this should be valid:


struct Foo {
    int opCall(bool b) {
        return 0;
    }
}
void main() {
   Foo foo;
   auto b1 = foo(true); // OK
   auto b2 = true.foo;  // Error
}


dmd 2.063alpha gives:

temp.d(9): Error: no property 'foo' for type 'bool'

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