You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Currently lazy injection works through a different computed propery behaviour. Due to using an enum for @Inject it is mutating. Hence it is not really useful in a struct, as we are not allowed to alter a variable within a struct Cannot use mutating getter on immutable value: function call returns immutable value. And as 'mutating' may only be used on 'func' declarations we need a different approach.
The text was updated successfully, but these errors were encountered:
We could possibly use @Inject var myService: MyServiceProtocol for lazy injection and var myService: MyServiceProtocol = resolve() for eager injection 🤔
Currently lazy injection works through a different computed propery behaviour. Due to using an enum for
@Inject
it is mutating. Hence it is not really useful in a struct, as we are not allowed to alter a variable within a structCannot use mutating getter on immutable value: function call returns immutable value
. And as'mutating' may only be used on 'func' declarations
we need a different approach.The text was updated successfully, but these errors were encountered: