Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

(v2) typedef not evaluated correctly override each other #48

Open
alebianco opened this issue Jun 24, 2015 · 1 comment
Open

(v2) typedef not evaluated correctly override each other #48

alebianco opened this issue Jun 24, 2015 · 1 comment

Comments

@alebianco
Copy link
Contributor

If i have two typedef like

typedef IServiceOne = IService<One>
typedef IServiceTwo = IService<Two>

with IService being an interface, and i try to map them to concrete classes, like

injector.map(IServiceOne).map(ServiceOne);
injector.map(IServiceTwo).map(ServiceTwo);

I'd get a warning because the mapping [IService -> ServiceTwo] is trying to override the mapping [IService -> ServiceOne]

It looks like the type parameter of my interface is not taken in consideration when creating the mapping.

[Workaround for this is to have IServiceOne and IServiceTwo as interfaces that extend IService instead of typedefs.]

@dpeek
Copy link
Contributor

dpeek commented Jul 23, 2015

Sorry about the delayed response, I've just released v2 rc1, I'll make sure I take a look at this before the final release.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants