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

Parametric-type related crash on Julia 1.7+ #44614

Closed
frankwswang opened this issue Mar 14, 2022 · 6 comments · Fixed by #44641
Closed

Parametric-type related crash on Julia 1.7+ #44614

frankwswang opened this issue Mar 14, 2022 · 6 comments · Fixed by #44641
Labels
regression Regression in behavior compared to a previous version types and dispatch Types, subtyping and method dispatch
Milestone

Comments

@frankwswang
Copy link

MWE:

struct T1{T}
    m::T
end

struct T2{L}
    tuple::NTuple{3, Int}

    function T2{L}(t::NTuple{3, Int}) where {L}
        new{sum(t)}(t)
    end
end

struct T3{L, N}
    a::Tuple{T2{L}}
    param::NTuple{N, T1}
    function T3(a::Tuple{T2{L}}, pars::NTuple{N, T1}) where {L, N}
        new{L, N}(a, pars)
    end
end

function f(ts)
    pars = []
    for t in ts
        append!(pars, t.param)
    end
    pars
end

t1_1 = ((T1{Float64}(1.0), T1{Int}(2)))

t1_2 = ((T1{Float64}(1.2), T1{Int}(1)))

t2_1 = (T2{1}((1,0,0)),)

t2_2 = (T2{2}((2,0,0)),)

[T3(t2_1, t1_1), T3(t2_2, t1_2)] |> f

Original Discourse discussion is here.

@vtjnash
Copy link
Member

vtjnash commented Mar 14, 2022

Sounds similar to #39088

Sounds similar to #44311 rather

@vtjnash vtjnash added types and dispatch Types, subtyping and method dispatch regression Regression in behavior compared to a previous version labels Mar 14, 2022
@vtjnash vtjnash added this to the 1.8 milestone Mar 14, 2022
vtjnash added a commit that referenced this issue Mar 16, 2022
vtjnash added a commit that referenced this issue Mar 22, 2022
DilumAluthge pushed a commit that referenced this issue Mar 22, 2022
@frankwswang
Copy link
Author

I think this problem is still not fixed on the Mac OS platform because, from the result of my GitHub CI, the testing code that was previously broken due to this bug still can not successfully run on the Mac OS platform (the same code on the Linux platform was fixed though). Unfortunately, I don't have a Mac machine myself so I couldn't test it locally. If anyone could just try running the aforementioned MWE with the latest nightly version of Julia on their Mac machine to double-check, that would be very helpful. Thanks!

@KristofferC
Copy link
Member

Did you check that the mac nightly was at the same commit as the Linux one?

@frankwswang
Copy link
Author

Did you check that the mac nightly was at the same commit as the Linux one?

Thanks! I just checked and the Mac OS one indeed wasn't running the latest commit (62e0729) of Julia as the Linux one was. Do you know why this is the case since they are both specified as "nightly" in the GitHub action .yml file?

@KristofferC
Copy link
Member

I guess the macos nightly hasn't updated yet.

KristofferC pushed a commit that referenced this issue Mar 23, 2022
Fix #44614

(cherry picked from commit e9ba166)
@frankwswang
Copy link
Author

I guess the macos nightly hasn't updated yet.

Got it. Thanks a lot!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
regression Regression in behavior compared to a previous version types and dispatch Types, subtyping and method dispatch
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants