Skip to content

Commit

Permalink
Fallback to autowire in factory method
Browse files Browse the repository at this point in the history
  • Loading branch information
mbore committed Nov 3, 2021
1 parent 190fa64 commit 21639ff
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -139,7 +139,7 @@ lazy val tt = `type`

providers.foldLeft(init) {
case (v, fm: FactoryMethod) => {
v :+ fm.result(findProviderIn(v)(_).getOrElse(c.abort(c.enclosingPosition, "TODO2")))
v :+ fm.result(x => findProviderIn(v)(x).getOrElse(q"com.softwaremill.macwire.autowire[$x](..${v.map(_.ident)})"))
}
case (v, _ ) => v
}.collect {
Expand Down

0 comments on commit 21639ff

Please sign in to comment.