From 5956a70aa617edc5031b0ead64f6321c7f7b5022 Mon Sep 17 00:00:00 2001 From: Venkateshprasad <32921645+ven-k@users.noreply.github.com> Date: Fri, 12 Apr 2024 16:25:45 +0530 Subject: [PATCH] fix: don't screen unit for a Unitful unit `__get_literal_unit` already screens units of DynamicQuantity.AbstractQuantity. So this check is redundant. Also, removing this check fixes the issue with `get_unit` for units of Unitful type. --- src/systems/unit_check.jl | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/systems/unit_check.jl b/src/systems/unit_check.jl index 677d29895f..4086da9a30 100644 --- a/src/systems/unit_check.jl +++ b/src/systems/unit_check.jl @@ -126,7 +126,7 @@ end function get_unit(x::Symbolic) if (u = __get_literal_unit(x)) !== nothing - screen_unit(u) + u elseif issym(x) get_literal_unit(x) elseif isadd(x)