Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix an empty tuple problem ahead of Julia 1.10 #869

Closed
KevinDCarlson opened this issue Dec 2, 2023 · 0 comments
Closed

Fix an empty tuple problem ahead of Julia 1.10 #869

KevinDCarlson opened this issue Dec 2, 2023 · 0 comments
Assignees
Labels

Comments

@KevinDCarlson
Copy link
Contributor

KevinDCarlson commented Dec 2, 2023

This code in pack_limit can lead to bad behavior if enough stuff is empty, as in the test on line 352 of CSets. This breaks in Julia 1.10 because Tuple{Union{}} is going to become illegal. Pretty sure the map just needs to be replaced with an explicit comprehension into VarFunctions, just not going to get to it tonight.

alim = NamedTuple(Dict(map(attrtypes(S)) do at 
      T = attrtype_type(Y, at)
      apx = VarSet{T}(nparts(Y, at))
      at => Multispan(apx, map(enumerate(cone_objects(diagram))) do (i, X) 
        v = map(parts(Y,at)) do p 
          f, c, j = var_reference(Y, at, p)
          X[legs(limits[c])[i](j), f]
        end
        VarFunction{T}(v, FinSet(nparts(X, at)))
      end)
    end))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants