www.digitalmars.com         C & C++   DMDScript  

digitalmars.D.bugs - [Issue 18031] New: Empty this compiles

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

          Issue ID: 18031
           Summary: Empty this compiles
           Product: D
           Version: D2
          Hardware: x86_64
                OS: Mac OS X
            Status: NEW
          Severity: enhancement
          Priority: P1
         Component: dmd
          Assignee: nobody puremagic.com
          Reporter: jonathan wilbur.space

```
public
struct CommandLineInterfaceOption
{
    immutable public string token;
    immutable public void function (string) callback;
    this (string token, void function (string) callback);
}
```

This compiles, even though `this` is undefined.

Is this supposed to happen?

--
Dec 04 2017