Documentation - factories - usage not shown
The section on factories shows two alternatives on how to define a factory:
def taxCalculator(taxBase: Double) = wire[TaxCalculator]
// or: lazy val taxCalculator = (taxBase: Double) => wire[TaxCalculator]
It does not show though, how a class can depend on such factory.
This answer on SO shows, how to inject a factory defined in a val (or lazy val) - second line in the documentation snippet
However, I have found no way on how to inject a factory, which is defined using a def - first line in the documentation snippet.
Depending on taxBase: Double => TaxCalculator (the function type) doesn't work? If not, than it's a bug.
Am I using it as intended ?
https://gist.github.com/ygor-sk/b8e64fc68627fe9a2930d78829147004
Yes, seems there's a bug or a missing feature :)