From 82a77aaa4eab6ca831bd1ec125ba2a7dae1b78f6 Mon Sep 17 00:00:00 2001 From: Martin Nowak Date: Wed, 24 Jan 2018 23:05:08 +0100 Subject: [PATCH] workaround Issue 18296 to fix coverage tests --- src/core/time.d | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/core/time.d b/src/core/time.d index 0b3ed028f7..7b4761c34c 100644 --- a/src/core/time.d +++ b/src/core/time.d @@ -523,7 +523,11 @@ public: foreach(U; _TypeTuple!(Duration, const Duration, immutable Duration)) { T t = 42; - U u = t; + // workaround https://issues.dlang.org/show_bug.cgi?id=18296 + version (D_Coverage) + U u = T(t._hnsecs); + else + U u = t; assert(t == u); assert(copy(t) == u); assert(t == copy(u));