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

          Issue ID: 14378
           Summary: ExpressionStatement incorrectly parsed as
                    BlockStatement
           Product: D
           Version: D2
          Hardware: All
                OS: All
            Status: NEW
          Keywords: accepts-invalid
          Severity: normal
          Priority: P1
         Component: DMD
          Assignee: [email protected]
          Reporter: [email protected]

Code:

```
import std.stdio;
void main()
{
    { writeln("test"); };
}
```

This program compiles and prints "test". The expected behavior is a compilation
failure with a message like "Error: delegate has no effect in expression {
writeln("test"); };"

--

Reply via email to