Skip to content
This repository has been archived by the owner on May 29, 2024. It is now read-only.

Commit

Permalink
feat(externals): consider typevars a bit better
Browse files Browse the repository at this point in the history
This allows passthrough-style drivers to work better, but is very far
from a general solution.
  • Loading branch information
tecosaur committed Jul 11, 2023
1 parent a0aa954 commit 6df5ed2
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion src/interaction/externals.jl
Original file line number Diff line number Diff line change
Expand Up @@ -201,7 +201,14 @@ function _read(dataset::DataSet, as::Type)
valid_storage_types =
filter(stype -> let accept = load_fn_sig.types[3]
if accept isa TypeVar
accept.lb <: stype <: accept.ub
# We can't really handle complex `TypeVar` situations,
# but we'll give the very most basic a shot, and cross
# our fingers with the rest.
if load_fn_sig.types[4] == Type{load_fn_sig.types[3]}
stype == as
else
accept.lb <: stype <: accept.ub
end
else # must be a Type
stype <: accept
end
Expand Down

0 comments on commit 6df5ed2

Please sign in to comment.