-
-
Notifications
You must be signed in to change notification settings - Fork 5.4k
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
StackOverflowError on a push! into a Dict #37349
Comments
The issue is that diff --git a/base/dict.jl b/base/dict.jl
index cc5c9efb6a..9628285bf4 100644
--- a/base/dict.jl
+++ b/base/dict.jl
@@ -373,3 +373,3 @@ end
function setindex!(h::Dict{K,V}, v0, key0) where V where K
- key = convert(K, key0)
+ key = convert(K, key0)::K
if !isequal(key, key0)
@@ -381,3 +381,3 @@ end
function setindex!(h::Dict{K,V}, v0, key::K) where V where K
- v = convert(V, v0)
+ v = convert(V, v0)::V
index = ht_keyindex2!(h, key)
@@ -451,3 +451,3 @@ get!(f::Function, collection, key)
function get!(default::Callable, h::Dict{K,V}, key0) where V where K
- key = convert(K, key0)
+ key = convert(K, key0)::K
if !isequal(key, key0)
@@ -464,3 +464,3 @@ function get!(default::Callable, h::Dict{K,V}, key::K) where V where K
age0 = h.age
- v = convert(V, default())
+ v = convert(V, default())::V
if h.age != age0 |
vtjnash
added a commit
that referenced
this issue
Sep 2, 2020
The tuple_tfunc failed to account for the possibility that the Type might be obscured inside a UnionAll or Union, and would fail to widen the params in that case. Refs #37349
vtjnash
added a commit
that referenced
this issue
Sep 2, 2020
Avoids a stack overflow and gives a proper error instead (as well as possibly improving inference of the consumers). Fixes #37349
vtjnash
added a commit
that referenced
this issue
Sep 2, 2020
The tuple_tfunc failed to account for the possibility that the Type might be obscured inside a UnionAll or Union, and would fail to widen the params in that case. Refs #37349
vtjnash
added a commit
that referenced
this issue
Sep 2, 2020
Avoids a stack overflow and gives a proper error instead (as well as possibly improving inference of the consumers). Fixes #37349
vtjnash
added a commit
that referenced
this issue
Sep 2, 2020
The tuple_tfunc failed to account for the possibility that the Type might be obscured inside a UnionAll or Union, and would fail to widen the params in that case. Refs #37349
vtjnash
added a commit
that referenced
this issue
Sep 2, 2020
Avoids a stack overflow and gives a proper error instead (as well as possibly improving inference of the consumers). Fixes #37349
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
The creation of a dictionary with a key of type
Tuple{Type{<:Real}}
causes aStackOverflowError
on apush!
. This occurs on both 1.5.0 and 1.5.1 versions of Julia (on windows).Using a
Type{<:Real}
does not have this issue.Version Information
The text was updated successfully, but these errors were encountered: