Closed AppyMike closed 3 years ago
If it's weak it's got to be optional, does it not?
@WeakLazyInjected var tableDelegate: TableDelegate?
sorry yes. Apologies for wasting your time.
I have a query related to this though. When using SwiftLint it throws the Weak Delegate Violation
on @WeakLazyInjected var tableDelegate: TableDelegate?
. Is this actually a violation or is just simply that SwiftLint can't find weak
? What I mean is does @WeakLazyInjected
effectively inject as weak var
?
No worries. As to the rest, internally it's weak but SwiftLint doesn't see it that way. It just pattern matches on "delegate" and starts complaining.
Whenever I try to use
@WeakLazyInjected
property wrapper I always get the error "Generic parameter 'Service' could not be inferred"Example:
register { TableDelegate() }
Am I missing something in the implmentation?