From f33814159793dbc54032238afa0f5687720aa740 Mon Sep 17 00:00:00 2001 From: Geod24 Date: Tue, 28 Jul 2020 09:46:30 +0900 Subject: [PATCH] [TEST ONLY] Enable `preview=in` by default --- src/dmd/globals.d | 2 +- test/run.d | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/dmd/globals.d b/src/dmd/globals.d index 8b0bc33841b4..686cc8a7f595 100644 --- a/src/dmd/globals.d +++ b/src/dmd/globals.d @@ -142,7 +142,7 @@ extern (C++) struct Param bool useTypeInfo = true; // generate runtime type information bool useExceptions = true; // support exception handling bool noSharedAccess; // read/write access to shared memory objects - bool previewIn; // `in` means `[ref] scope const`, accepts rvalues + bool previewIn = true; // `in` means `[ref] scope const`, accepts rvalues bool shortenedMethods; // allow => in normal function declarations bool betterC; // be a "better C" compiler; no dependency on D runtime bool addMain; // add a default main() function diff --git a/test/run.d b/test/run.d index 388e9b0109d7..048e6a6ce906 100755 --- a/test/run.d +++ b/test/run.d @@ -164,7 +164,7 @@ Options: args = ["all"]; // move any long-running tests to the front - static size_t sortKey(in ref Target target) + static size_t sortKey(const scope ref Target target) { const name = target.normalizedTestName; if (name.startsWith("runnable"))