dlang-tour / core

D Language online tour (https://tour.dlang.org/) and online editor (https://run.dlang.io/)
Boost Software License 1.0
119 stars 48 forks source link

Syntax for annotations in the unittest example are wrong #676

Closed mziwisky closed 6 years ago

mziwisky commented 6 years ago

https://tour.dlang.org/tour/en/gems/unittesting has an example of

unittest @safe @nogc nothrow pure
{
    assert(myAbs() == 1);
}

but this doesn't compile with dmd -unittest. It looks like the unittest keyword should actually come after the annotations, according to https://dlang.org/spec/unittest.html#attributes_unittest

wilzbach commented 6 years ago

Thanks! -> https://github.com/dlang-tour/english/pull/243