[Issue 9590] New: UFCS does not work with void lazy expressions

d-bugmail at puremagic.com d-bugmail at puremagic.com
Mon Feb 25 18:03:16 PST 2013


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

           Summary: UFCS does not work with void lazy expressions
           Product: D
           Version: D2
          Platform: All
        OS/Version: All
            Status: NEW
          Keywords: rejects-valid
          Severity: normal
          Priority: P2
         Component: DMD
        AssignedTo: nobody at puremagic.com
        ReportedBy: andrej.mitrovich at gmail.com


--- Comment #0 from Andrej Mitrovic <andrej.mitrovich at gmail.com> 2013-02-25 18:03:15 PST ---
private auto test(E)(lazy E expr) { }

int f1()  { assert(0); }
void f2() { assert(0); }

void main()
{
    test(f1());  // ok, no exceptions (lazy)
    f1().test;   // ok, no exceptions (lazy)

    test(f2());  // ok, no exceptions (lazy)
    f2().test;   // L12: NG
}

$ test.d(12): Error: no property 'test' for type 'void'

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