From e51a019d691301f17db6f9f6d12618be30a95795 Mon Sep 17 00:00:00 2001 From: Geod24 Date: Sun, 2 Aug 2020 19:57:29 +0900 Subject: [PATCH] Add 'return' annotations to some tests Currently those trigger deprecations messages. Since they are just used in unittests, it doesn't affect client code. --- source/vibe/internal/traits.d | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/source/vibe/internal/traits.d b/source/vibe/internal/traits.d index f8696d1..bd4e8d1 100644 --- a/source/vibe/internal/traits.d +++ b/source/vibe/internal/traits.d @@ -194,7 +194,7 @@ unittest { // write-only property (NO) @property void p3(int value) { privateJ = value; } // ref returning property (OK) - @property ref int p4() { return i; } + @property ref int p4() return { return i; } // parameter-less template property (OK) @property ref int p5()() { return i; } // not treated as a property by DMD, so not a field @@ -204,7 +204,7 @@ unittest { static @property int p7() { return k; } static @property void p7(int value) { k = value; } - ref int f1() { return i; } // ref returning function (no field) + ref int f1() return { return i; } // ref returning function (no field) int f2(Args...)(Args args) { return i; } @@ -308,7 +308,7 @@ unittest { // normal fields enum c = 42; void f(); static void g(); - ref int h() { return a; } + ref int h() return { return a; } static ref int i() { return b; } } static assert(isNonStaticMember!(S, "a"));