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

          Issue ID: 14360
           Summary: DMD should compile SDC test0156.d
           Product: D
           Version: unspecified
          Hardware: x86
                OS: Mac OS X
            Status: NEW
          Severity: enhancement
          Priority: P1
         Component: DMD
          Assignee: [email protected]
          Reporter: [email protected]

```
> rdmd test0156.d
test0156.d(19): Error: function expected before (), not foo() of type int
```

```test0156.d
//T compiles:yes
//T has-passed:yes
//T retval:36
// Closure chaining

int main() {
    int a = 11;

    auto foo() {
        int b = 25;

        auto bar() {
            return a + b;
        }

        return bar;
    }

    return foo()();
}

```

--

Reply via email to