Fix else case not being properly excluded from compiled code

This commit is contained in:
Mike Bierlee 2016-12-09 00:48:32 +01:00
parent ea41a04657
commit c75b025a68

View file

@ -129,7 +129,7 @@ private void autowireMember(string member, size_t memberIndex, Type)(shared(Depe
foreach(attribute; __traits(getAttributes, Type.tupleof[memberIndex])) { foreach(attribute; __traits(getAttributes, Type.tupleof[memberIndex])) {
static if (is(attribute == Autowire!T, T)) { static if (is(attribute == Autowire!T, T)) {
injectInstance!(member, memberIndex, typeof(attribute.qualifier))(container, instance); 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); injectInstance!(member, memberIndex, UseMemberType)(container, instance);
} }
} }