From 63bbbd0a148b1f3ad8e4235339ea2e4a6a8862a2 Mon Sep 17 00:00:00 2001 From: "Harry T. Vennik" Date: Sat, 19 Aug 2017 14:52:38 +0200 Subject: [PATCH] Fix template bug in type conversion for BitFlags --- source/ddbus/conv.d | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/source/ddbus/conv.d b/source/ddbus/conv.d index c4891d5..1a85bdd 100644 --- a/source/ddbus/conv.d +++ b/source/ddbus/conv.d @@ -173,7 +173,7 @@ T readIter(T)(DBusMessageIter *iter) if (isInstanceOf!(BitFlags, T)) { alias TemplateArgsOf!T[0] E; alias OriginalType!E B; - B mask = only(EnumMembers!E).fold!((a, b) => a | b); + B mask = only(EnumMembers!E).fold!((a, b) => cast(B) (a | b)); B value = readIter!B(iter); enforce(