www.digitalmars.com         C & C++   DMDScript  

digitalmars.D.bugs - [Issue 14378] New: ExpressionStatement incorrectly parsed as


          Issue ID: 14378
           Summary: ExpressionStatement incorrectly parsed as
           Product: D
           Version: D2
          Hardware: All
                OS: All
            Status: NEW
          Keywords: accepts-invalid
          Severity: normal
          Priority: P1
         Component: DMD
          Assignee: nobody puremagic.com
          Reporter: briancschott gmail.com


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"); };"

Mar 30 2015