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

.init not recognized by generator #394

Open
fabianmuecke opened this issue Aug 16, 2021 · 2 comments
Open

.init not recognized by generator #394

fabianmuecke opened this issue Aug 16, 2021 · 2 comments

Comments

@fabianmuecke
Copy link

Hey, I'm currently evaluating using Needle in our app and it looks quite promising. It took me quite some time to figure out, why the generator generated nothing beyond my RootComponent, though.

Turns out, I was doing:
var foo: FooComponent { .init(parent: self) } and the generator does not recognize the dependency between RootComponent and FooComponent that way. var foo: FooComponent { FooComponent(parent: self) } works as expected.

Maybe not the most important thing, as one should be using protocols for most things anyway and you can't make that mistake, when your return type is a protocol... But would it be possible to support that, just to eliminate the possibility of human error here?

@Ar4ibald
Copy link

same issue

@farzadshbfn
Copy link

Also same issue

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

3 participants