Skip to content

Commit 00ad788

Browse files
Update unit_check.jl
1 parent 7daa0e2 commit 00ad788

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

src/systems/unit_check.jl

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -69,7 +69,9 @@ get_unit(x::Real) = unitless
6969
get_unit(x::DQ.AbstractQuantity) = screen_unit(x)
7070
get_unit(x::AbstractArray) = map(get_unit, x)
7171
get_unit(x::Num) = get_unit(unwrap(x))
72-
get_unit(x::Symbolics.Arr) = get_unit(unwrap(x))
72+
function get_unit(x::Union{Symbolics.ArrayOp, Symbolics.Arr, Symbolics.CallWithMetadata})
73+
get_literal_unit(x)
74+
end
7375
get_unit(op::Differential, args) = get_unit(args[1]) / get_unit(op.x)
7476
get_unit(op::Difference, args) = get_unit(args[1]) / get_unit(op.t)
7577
get_unit(op::typeof(getindex), args) = get_unit(args[1])

0 commit comments

Comments
 (0)