-
-
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
Possible type inference regression in mapreduce #38240
Labels
regression
Regression in behavior compared to a previous version
Milestone
Comments
jipolanco
added a commit
to jipolanco/BSplineKit.jl
that referenced
this issue
Nov 6, 2020
JeffBezanson
added
the
regression
Regression in behavior compared to a previous version
label
Dec 11, 2020
Fixed on latest master. |
Does/should this have a test? |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
On Julia master, there seems to be a type inference issue when reducing over values known at compile time. This looks similar to #35800, but I'm not sure if it's related.
For instance,
On Julia master:
On Julia 1.5 the result
Val(2)
is correctly inferred:Note that in this specific case, a workaround is to replace
maximum(map(ndims, arrays))
bymax(map(ndims, arrays)...)
(see LazyArrays PR).It seems like the issue can be tracked down to
mapreduce
. The following also fails on Julia master, while it works on 1.5 (note thatreduce
callsmapreduce
):The same happens with
foldl
andfoldr
.Also note that the following is correctly inferred:
so the issue really seems to come from the reduction step.
Version info:
The text was updated successfully, but these errors were encountered: