[Issue 15103] New: Improve declaration / initialization syntax error message

via Digitalmars-d-bugs digitalmars-d-bugs at puremagic.com
Wed Sep 23 08:26:15 PDT 2015


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: nobody at puremagic.com
          Reporter: luis at 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)`.

--


More information about the Digitalmars-d-bugs mailing list