From 58a1cc274f1dc02b738c56793f54c4fea1352bb8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?S=C3=B6nke=20Ludwig?= Date: Mon, 10 Oct 2016 12:32:42 +0200 Subject: [PATCH] Add a proper workaround for the void intializer error in DMD 2.072.0-b2. --- source/taggedalgebraic.d | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/source/taggedalgebraic.d b/source/taggedalgebraic.d index 5b1112c..18a12d7 100644 --- a/source/taggedalgebraic.d +++ b/source/taggedalgebraic.d @@ -53,7 +53,7 @@ struct TaggedAlgebraic(U) if (is(U == union) || is(U == struct)) private { - void[Largest!FieldTypes.sizeof] m_data = void; + void[Largest!FieldTypes.sizeof] m_data; Kind m_kind; } @@ -277,7 +277,7 @@ unittest alias TA = TaggedAlgebraic!Test; - TA ta = null; // FIXME: should also work for implicit initialization, but DMD complains since 2.072.0-b1 + TA ta; assert(ta.kind == TA.Kind.null_); ta = 12;