Skip to content

Commit 5c95478

Browse files
committed
Ensure correct Dimension type is passed
1 parent 533e032 commit 5c95478

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

src/DimensionalAnalysis.jl

+5-1
Original file line numberDiff line numberDiff line change
@@ -74,7 +74,11 @@ for op in (:(Base.:+), :(Base.:-))
7474
if same_dimensions(l, r)
7575
return W($(op)(l.val, r.val), l.wildcard && r.wildcard, false)
7676
elseif l.wildcard && r.wildcard
77-
return W(constructor_of(Q)($(op)(ustrip(l), ustrip(r))), true, false)
77+
return W(
78+
constructor_of(Q)($(op)(ustrip(l), ustrip(r)), typeof(dimension(l))),
79+
true,
80+
false,
81+
)
7882
elseif l.wildcard
7983
return W($(op)(constructor_of(Q)(ustrip(l), dimension(r)), r.val), false, false)
8084
elseif r.wildcard

0 commit comments

Comments
 (0)