-
-
Notifications
You must be signed in to change notification settings - Fork 5.5k
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
defining functions kills the julia interpreter #36804
Labels
bug
Indicates an unexpected problem or unintended behavior
types and dispatch
Types, subtyping and method dispatch
Comments
Probably it breaks some internal functions similar to #35436 and linked issues? |
He is not overloading a Base function though. All the linked issues overloaded Base functions. |
Yeah, this is a type system bug |
I believe re-ordering the 2nd and 3rd declarations solves your issue: const Either{L, R} = Union{Some{L}, Ref{R}}
f(::Type{Either{L, R1}}, ::Type{Either{L, R2}}) where {L, R1, R2 <: R1} = Either{L, R1}
f(::Type{Either{L2, R}}, ::Type{Either{L1, R}}) where {L1, R, L2 <: L1} = Either{L1, R} But I have no clue why does it solve your issue, though. |
#38423 might be a dup of this. |
JeffBezanson
added a commit
that referenced
this issue
Dec 10, 2020
JeffBezanson
added a commit
that referenced
this issue
Dec 10, 2020
JeffBezanson
added a commit
that referenced
this issue
Dec 14, 2020
KristofferC
pushed a commit
that referenced
this issue
Dec 17, 2020
staticfloat
pushed a commit
that referenced
this issue
Jan 15, 2021
ElOceanografo
pushed a commit
to ElOceanografo/julia
that referenced
this issue
May 4, 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
bug
Indicates an unexpected problem or unintended behavior
types and dispatch
Types, subtyping and method dispatch
Hi,
I just stumbled upon a pecularity when defining certain functions. I am not sure, whether this is expected, but it looks quite frightening from a user perspective.
The following code will kill my julia repl (actually sometimes it resulted in a StackOverflow instead, however now it is always killing it immediately)
Copy paste
and boom.
my versions:
The text was updated successfully, but these errors were encountered: