Closed kmcphillips closed 4 years ago
As described in #127 @trcarden, defining the value of a unit using an alias raises.
This happens because we don't have the UnitSystem defined yet that can look up the aliases. It's a chicken egg problem.
UnitSystem
So we do the search manually in this case, rather than error. It's not a huge amount of effort, with a little duplication.
I've refactored the with( method to maintain immutability of Unit.
with(
Unit
Closes #127
I'll have to fiddle with CI. And there's some unreleated deprecations I'll fix in this release too.
As described in #127 @trcarden, defining the value of a unit using an alias raises.
This happens because we don't have the
UnitSystem
defined yet that can look up the aliases. It's a chicken egg problem.So we do the search manually in this case, rather than error. It's not a huge amount of effort, with a little duplication.
I've refactored the
with(
method to maintain immutability ofUnit
.