Conditionally compile TaskFiber.state.

See https://issues.dlang.org/show_bug.cgi?id=17131
This commit is contained in:
Sönke Ludwig 2017-02-01 11:05:53 +01:00
parent 2ed82ca975
commit b8663f9fbc
No known key found for this signature in database
GPG key ID: D95E8DB493EE314C

View file

@ -322,11 +322,9 @@ final package class TaskFiber : Fiber {
return ms_globalDummyFiber;
}
@property State state()
@trusted const nothrow {
return super.state;
}
// expose Fiber.state as @safe on older DMD versions
static if (!__traits(compiles, () @safe { return Fiber.init.state; } ()))
@property State state() @trusted const nothrow { return super.state; }
private void run()
{