From 1772d04106166eb9400409d0c6e731fdff1ee0bb Mon Sep 17 00:00:00 2001 From: Sebastian Wilzbach Date: Tue, 23 Jan 2018 23:25:53 +0100 Subject: [PATCH 1/2] Remove pointless version(unittest) --- src/object.d | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/object.d b/src/object.d index 45634ed2fc..246d7ef553 100644 --- a/src/object.d +++ b/src/object.d @@ -3010,7 +3010,7 @@ void destroy(T : U[n], U, size_t n)(ref T obj) if (!is(T == struct)) destroy(e); } -version(unittest) unittest +unittest { int[2] a; a[0] = 1; From 8efb219159042fdc58bd0216ba6287869a90bc63 Mon Sep 17 00:00:00 2001 From: Steven Schveighoffer Date: Tue, 23 Jan 2018 18:44:21 -0500 Subject: [PATCH 2/2] Remove 3 more pointless version(unittest) --- src/object.d | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/object.d b/src/object.d index 246d7ef553..29258aa808 100644 --- a/src/object.d +++ b/src/object.d @@ -2895,7 +2895,7 @@ void destroy(T)(T obj) if (is(T == interface)) destroy(cast(Object)obj); } -version(unittest) unittest +unittest { interface I { } { @@ -2964,7 +2964,7 @@ void destroy(T)(ref T obj) if (is(T == struct)) } (); } -version(unittest) nothrow @safe @nogc unittest +nothrow @safe @nogc unittest { { struct A { string s = "A"; } @@ -3084,7 +3084,7 @@ template _isStaticArray(T) enum bool _isStaticArray = false; } -version(unittest) unittest +unittest { { int a = 42;