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

Inherited injectable properties are not resolved. #28

Closed
bobjackman opened this issue Jan 16, 2018 · 1 comment
Closed

Inherited injectable properties are not resolved. #28

bobjackman opened this issue Jan 16, 2018 · 1 comment

Comments

@bobjackman
Copy link
Contributor

injector.resolveInjections() uses classMirror.declarations to obtain a list of all injectable variables on a class. However, classMirror.declarations doesn't include inherited properties as such, the following injection is never resolved:

class Foo extends Bar {
  Foo():super();
}

class Bar {
  @inject Zap myInjectedProperty;

  Bar() {
    // setup
  }
}

var bar = new Bar();
print(bar.myInjectedProperty); // <<-- instance of Zap

var foo = new Foo();
print(foo.myInjectedProperty); // <<-- null
@ltackmann
Copy link
Owner

Should be fixed by pull request. @MikeMitterer previously asked if he could take over this project as I have little time.

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