From c75b025a68defbbf8432a1391e8c68101b2abc34 Mon Sep 17 00:00:00 2001 From: Mike Bierlee Date: Fri, 9 Dec 2016 00:48:32 +0100 Subject: [PATCH] Fix else case not being properly excluded from compiled code --- source/poodinis/autowire.d | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/source/poodinis/autowire.d b/source/poodinis/autowire.d index 2ca4b21..f21c1a3 100644 --- a/source/poodinis/autowire.d +++ b/source/poodinis/autowire.d @@ -129,7 +129,7 @@ private void autowireMember(string member, size_t memberIndex, Type)(shared(Depe foreach(attribute; __traits(getAttributes, Type.tupleof[memberIndex])) { static if (is(attribute == Autowire!T, T)) { injectInstance!(member, memberIndex, typeof(attribute.qualifier))(container, instance); - } else if (__traits(isSame, attribute, Autowire)) { + } else static if (__traits(isSame, attribute, Autowire)) { injectInstance!(member, memberIndex, UseMemberType)(container, instance); } }