From 18bad0cafc7d2419c5f40384a4de635b8273911e Mon Sep 17 00:00:00 2001 From: Venkateshprasad <32921645+ven-k@users.noreply.github.com> Date: Wed, 1 May 2024 12:18:55 +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)