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

          Issue ID: 15103
           Summary: Improve declaration / initialization syntax error
                    message
           Product: D
           Version: D2
          Hardware: All
                OS: All
            Status: NEW
          Severity: enhancement
          Priority: P1
         Component: dmd
          Assignee: nob...@puremagic.com
          Reporter: l...@luismarques.eu

--

struct Foo
{
    this(int x) {}
}

void main()
{
    Foo foo(42);
}

(8): Error: found 'foo' when expecting ';' following statement

--

The problem is not that 'foo' was found, since `Foo foo` is fine, as is `Foo
foo = Foo(42)`.

--

Reply via email to