Am 25.11.2016 um 12:39 schrieb Timon Gehr:
On 24.11.2016 10:24, Kagamin wrote:
I see no ambiguity even if parsing is not greedy.


import std.stdio;
pragma(mangle,"_D2tt4mainFZ3fooUZv")
void foo()in{ assert(true); }{
    writeln("Hello World!");
}
void main(){
    static extern(C) void foo()in{ assert(true); }
    { foo(); }
}

Removing contracts, is this this code (printing "Hello World!"):

import std.stdio;
pragma(mangle,"_D2tt4mainFZ3fooUZv")
void foo(){
    writeln("Hello World!");
}
void main(){
    static extern(C) void foo();
    { foo(); }
}

Not without explicitly adding that ";".

Reply via email to