From 111b5c5af3654c1222e554004ef9bf8af5b52870 Mon Sep 17 00:00:00 2001 From: "Harry T. Vennik" Date: Tue, 20 Jun 2017 21:23:53 +0200 Subject: [PATCH] Cleanup typeSig implementation for DictionaryEntry --- source/ddbus/util.d | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/source/ddbus/util.d b/source/ddbus/util.d index f695016..64d533c 100644 --- a/source/ddbus/util.d +++ b/source/ddbus/util.d @@ -120,10 +120,9 @@ string typeSig(T)() if(canDBus!T) { } string typeSig(T)() if(isInstanceOf!(DictionaryEntry, T)) { - static if(is(T == DictionaryEntry!(K, V), K, V)) // need to get K and V somehow - return "{" ~ typeSig!K ~ typeSig!V ~ '}'; - else - static assert (false, "DictionaryEntry always has a key type and value type, right?"); + alias typeof(T.key) K; + alias typeof(T.value) V; + return "{" ~ typeSig!K ~ typeSig!V ~ '}'; } string[] typeSigReturn(T)() if(canDBus!T) {