[Issue 10349] New: UFCS fails under a with statement block

d-bugmail at puremagic.com d-bugmail at puremagic.com
Wed Jun 12 21:40:59 PDT 2013


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

           Summary: UFCS fails under a with statement block
           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: alanb at ucora.com


--- Comment #0 from Rob T <alanb at ucora.com> 2013-06-12 21:40:55 PDT ---
Attempts to use UFCS as a means to externally extend classes and structs fails
when used under a with statement.

Example:

struct S
{
   void a(){ ... }
   void b(){ ... }
   void d(){ ... }
}

void c(S s){ ... }

void main()
{
  S s;
  with (s)
  {
     a;
     b;
     c; // compiler error
     d;
  }
}

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