From f0a1962536bc874dca4f06b6a8eccfa126757cd0 Mon Sep 17 00:00:00 2001 From: Walter Bright Date: Mon, 16 Mar 2020 23:48:17 -0700 Subject: [PATCH] pure functions infer scope, but not return 5 --- src/core/internal/utf.d | 2 +- src/rt/aaA.d | 2 +- src/rt/monitor_.d | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/core/internal/utf.d b/src/core/internal/utf.d index 38755ede5f..ca0f7f599a 100644 --- a/src/core/internal/utf.d +++ b/src/core/internal/utf.d @@ -692,7 +692,7 @@ string toUTF8(const scope dchar[] s) /* =================== Conversion to UTF16 ======================= */ @safe pure nothrow @nogc -wchar[] toUTF16(wchar[] buf, dchar c) +wchar[] toUTF16(return wchar[] buf, dchar c) in { assert(isValidDchar(c)); diff --git a/src/rt/aaA.d b/src/rt/aaA.d index c1d81ec723..0109bae5fb 100644 --- a/src/rt/aaA.d +++ b/src/rt/aaA.d @@ -854,7 +854,7 @@ struct Range extern (C) pure nothrow @nogc @safe { - Range _aaRange(AA aa) + Range _aaRange(return AA aa) { if (!aa) return Range(); diff --git a/src/rt/monitor_.d b/src/rt/monitor_.d index 2a9f7ee093..5af0d9319d 100644 --- a/src/rt/monitor_.d +++ b/src/rt/monitor_.d @@ -233,7 +233,7 @@ struct Monitor private: -@property ref shared(Monitor*) monitor(Object h) pure nothrow @nogc +@property ref shared(Monitor*) monitor(return Object h) pure nothrow @nogc { return *cast(shared Monitor**)&h.__monitor; }