Merge pull request #94 from vibe-d/test_latest_compilers

Fix deprecation warnings on DMD 2.082.0
This commit is contained in:
Sönke Ludwig 2018-10-23 15:33:14 +02:00 committed by GitHub
commit e011c31c2f
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 2 additions and 1 deletions

View file

@ -153,7 +153,7 @@ struct ScopedLock(T)
*/ */
@property inout(T) unsafeGet() inout nothrow { return m_ref; } @property inout(T) unsafeGet() inout nothrow { return m_ref; }
inout(T) opDot() inout nothrow { return m_ref; } alias unsafeGet this;
//pragma(msg, "In ScopedLock!("~T.stringof~")"); //pragma(msg, "In ScopedLock!("~T.stringof~")");
//pragma(msg, isolatedRefMethods!T()); //pragma(msg, isolatedRefMethods!T());
// mixin(isolatedAggregateMethodsString!T()); // mixin(isolatedAggregateMethodsString!T());

View file

@ -689,6 +689,7 @@ void hibernate(scope void delegate() @safe nothrow on_interrupt = null)
*/ */
void switchToTask(Task t) void switchToTask(Task t)
@safe nothrow { @safe nothrow {
import std.typecons : Yes, No;
auto defer = TaskFiber.getThis().m_yieldLockCount > 0 ? Yes.defer : No.defer; auto defer = TaskFiber.getThis().m_yieldLockCount > 0 ? Yes.defer : No.defer;
s_scheduler.switchTo(t, defer); s_scheduler.switchTo(t, defer);
} }