www.digitalmars.com         C & C++   DMDScript  

digitalmars.D.bugs - [Issue 13681] New: safe empty writeln

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

          Issue ID: 13681
           Summary:  safe empty writeln
           Product: D
           Version: D2
          Hardware: x86
                OS: Windows
            Status: NEW
          Severity: enhancement
          Priority: P1
         Component: Phobos
          Assignee: nobody puremagic.com
          Reporter: bearophile_hugs eml.cc

void main()  safe {
    import std.stdio: writeln;
    writeln;
}

dmd 2.067alpha gives:

test.d(3,5): Error: safe function 'D main' cannot call system function
'std.stdio.writeln!().writeln'


Note that this compiles:

void main()  safe {
    import std.stdio: write;
    write('\n');
}

--
Nov 04 2014