[Issue 500] New: Cannot assign to delegate during definition

d-bugmail at puremagic.com d-bugmail at puremagic.com
Mon Nov 13 03:08:03 PST 2006


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

           Summary: Cannot assign to delegate during definition
           Product: D
           Version: 0.173
          Platform: PC
        OS/Version: Windows
            Status: NEW
          Severity: minor
          Priority: P2
         Component: DMD
        AssignedTo: bugzilla at digitalmars.com
        ReportedBy: marsell_pk at yahoo.com


This compiles:
  void delegate() y;
  y = { ... };

This does not:
  void delegate() y = { ... };

For example:
  void main() {
  //      void delegate() y = { return; };
        void delegate() y;
        y = { return; };
        x(y);
  }

  void x(void delegate() y) {
    y();
  }


-- 




More information about the Digitalmars-d-bugs mailing list