Skip to content

Commit

Permalink
Fix constructorof import
Browse files Browse the repository at this point in the history
  • Loading branch information
MilesCranmer committed Nov 13, 2023
1 parent cc4712c commit fe200cf
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions src/DimensionalAnalysis.jl
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ module DimensionalAnalysisModule

import DynamicExpressions: Node
import DynamicQuantities:
Quantity, DimensionError, AbstractQuantity, dimension, ustrip, uparse, constructor_of
Quantity, DimensionError, AbstractQuantity, dimension, ustrip, uparse
import Tricks: static_hasmethod

import ..CoreModule: Options, Dataset
Expand Down Expand Up @@ -75,14 +75,14 @@ for op in (:(Base.:+), :(Base.:-))
return W($(op)(l.val, r.val), l.wildcard && r.wildcard, false)
elseif l.wildcard && r.wildcard
return W(
constructor_of(Q)($(op)(ustrip(l), ustrip(r)), typeof(dimension(l))),
constructorof(Q)($(op)(ustrip(l), ustrip(r)), typeof(dimension(l))),
true,
false,
)
elseif l.wildcard
return W($(op)(constructor_of(Q)(ustrip(l), dimension(r)), r.val), false, false)
return W($(op)(constructorof(Q)(ustrip(l), dimension(r)), r.val), false, false)
elseif r.wildcard
return W($(op)(l.val, constructor_of(Q)(ustrip(r), dimension(l))), false, false)
return W($(op)(l.val, constructorof(Q)(ustrip(r), dimension(l))), false, false)
else
return W(one(Q), false, true)
end
Expand Down

0 comments on commit fe200cf

Please sign in to comment.