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

@InjectableName does not work if you use a variable for name #24

Open
ncipollo opened this issue Nov 4, 2024 · 0 comments
Open

@InjectableName does not work if you use a variable for name #24

ncipollo opened this issue Nov 4, 2024 · 0 comments

Comments

@ncipollo
Copy link
Contributor

ncipollo commented Nov 4, 2024

If you use a variable rather than a static string for @InjectableName it does not actually use the name (it defaults to nil).

For example, this does not work:

@Injectable
struct SomeStruct {
    @InjectableName(name: Constants.someName)
    let someDependency: Dependency
}

However this does:

@Injectable
struct SomeStruct {
    @InjectableName(name: "some_name")
    let someDependency: Dependency
}
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

1 participant