From 264f4922924e972f97654a70c4ff73476cfa4ab6 Mon Sep 17 00:00:00 2001 From: Mike Bierlee Date: Sat, 28 Feb 2015 16:59:50 +0100 Subject: [PATCH] Get rid of obsolete member reference --- source/poodinis/autowire.d | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/source/poodinis/autowire.d b/source/poodinis/autowire.d index e449afc..f80d1d0 100644 --- a/source/poodinis/autowire.d +++ b/source/poodinis/autowire.d @@ -100,8 +100,7 @@ private void autowireMember(string member, Type)(DependencyContainer container, foreach(autowireAttribute; __traits(getAttributes, __traits(getMember, instance, member))) { static if (__traits(isSame, autowireAttribute, Autowire) || is(autowireAttribute == Autowire!T, T)) { if (__traits(getMember, instance, member) is null) { - alias memberReference = TypeTuple!(__traits(getMember, instance, member)); - alias MemberType = typeof(memberReference)[0]; + alias MemberType = typeof(__traits(getMember, instance, member)); debug(poodinisVerbose) { TypeInfo qualifiedInstanceType = typeid(MemberType); @@ -110,12 +109,12 @@ private void autowireMember(string member, Type)(DependencyContainer container, MemberType qualifiedInstance; static if (is(autowireAttribute == Autowire!T, T) && !is(autowireAttribute.qualifier == UseMemberType)) { alias QualifierType = typeof(autowireAttribute.qualifier); - qualifiedInstance = container.resolve!(typeof(memberReference), QualifierType); + qualifiedInstance = container.resolve!(MemberType, QualifierType); debug(poodinisVerbose) { qualifiedInstanceType = typeid(QualifierType); } } else { - qualifiedInstance = container.resolve!(typeof(memberReference)); + qualifiedInstance = container.resolve!(MemberType); } __traits(getMember, instance, member) = qualifiedInstance;