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

Stack overflow when defining some promote_rules on nightly #38423

Closed
KristofferC opened this issue Nov 13, 2020 · 0 comments · Fixed by #38810 or #38795
Closed

Stack overflow when defining some promote_rules on nightly #38423

KristofferC opened this issue Nov 13, 2020 · 0 comments · Fixed by #38810 or #38795
Assignees
Labels
types and dispatch Types, subtyping and method dispatch
Milestone

Comments

@KristofferC
Copy link
Member

This stack overflows on nightly:

struct Identity{T}
  value::T
end

struct Const{T}
  value::T
end

const Either{L, R} = Union{Const{L}, Identity{R}}

Base.promote_rule(::Type{Const{L2}}, ::Type{Either{L1, R}}) where {L1, R, L2 <: L1} = Either{L1, R}
Base.promote_rule(::Type{Const{L}}, ::Type{Either{L, <:Any}}) where {L} = Either{L, <:Any}

Reduced from PkgEval failure in DataTypesBasic.jl (https://s3.amazonaws.com/julialang-reports/nanosoldier/pkgeval/by_hash/c3bb6df_vs_788b2c7/Continuables.1.6.0-DEV-a896693d33.log).

@KristofferC KristofferC added this to the 1.6 features milestone Nov 13, 2020
@vtjnash vtjnash added the types and dispatch Types, subtyping and method dispatch label Dec 1, 2020
@JeffBezanson JeffBezanson self-assigned this Dec 9, 2020
JeffBezanson added a commit that referenced this issue Dec 10, 2020
JeffBezanson added a commit that referenced this issue Dec 10, 2020
KristofferC pushed a commit that referenced this issue Dec 17, 2020
staticfloat pushed a commit that referenced this issue Jan 15, 2021
staticfloat pushed a commit that referenced this issue Dec 23, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
types and dispatch Types, subtyping and method dispatch
Projects
None yet
3 participants