Skip to content

Commit c590c3b

Browse files
fix: fix type promotion in varmap_to_vars
1 parent 556963e commit c590c3b

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

src/variables.jl

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -211,6 +211,9 @@ function _varmap_to_vars(varmap::Dict, varlist; defaults = Dict(), check = false
211211
T = promote_type(T, typeof(val))
212212
end
213213
end
214+
if T == Union{} || T == Any || T <: BasicSymbolic
215+
T = identity
216+
end
214217
missingvars = setdiff(varlist, collect(keys(values)))
215218
check && (isempty(missingvars) || throw(MissingVariablesError(missingvars)))
216219
return [T(values[unwrap(var)]) for var in varlist]

0 commit comments

Comments
 (0)