[Issue 20860] New: OpDispatch does not work for structs with constructor and destructor

d-bugmail at puremagic.com d-bugmail at puremagic.com
Sun May 24 11:43:32 UTC 2020


https://issues.dlang.org/show_bug.cgi?id=20860

          Issue ID: 20860
           Summary: OpDispatch does not work for structs with constructor
                    and destructor
           Product: D
           Version: D2
          Hardware: x86_64
                OS: Linux
            Status: NEW
          Severity: enhancement
          Priority: P1
         Component: dmd
          Assignee: nobody at puremagic.com
          Reporter: contact at szabobogdan.com

It looks like opDispatch does not work in this case:

```
struct A
{ 
    this(int a) {}
  ///
  void opDispatch(string methodName, Params...)(Params params) {
  }

  ~this() {}
}

void main()
{
    A(3).test();
}

```

--


More information about the Digitalmars-d-bugs mailing list