Skip to content

Commit

Permalink
by-name param to fix recursive reader def
Browse files Browse the repository at this point in the history
  • Loading branch information
erikerlandson committed Apr 25, 2024
1 parent 24fccfb commit 4d9a2dc
Showing 1 changed file with 3 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,9 @@ object ruJSON:

given ctx_RuntimeUnit_JSON_Reader(using
rr: ConfigReader[Rational],
upm: UnitPathMapper
upm: UnitPathMapper,
// by-name parameter to handle recursive definition
crru: => ConfigReader[RuntimeUnit]
): ConfigReader[RuntimeUnit] =
ConfigReader[Rational].map(RuntimeUnit.UnitConst(_))
`orElse` ConfigReader[String].emap { id =>
Expand Down

0 comments on commit 4d9a2dc

Please sign in to comment.