-
-
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
Remove type-unlimited unary +
and *
#45320
Conversation
@nanosoldier |
+
and *
+
and *
I am moving the discussion to this PR from #44564. CC @nalimilan
No problem - that is why I am reporting. The point is that I do not insist on this PR, but I would want to have a conscious decision that we want to allow these operations (in DataFrames.jl I strictly test if nonsense operations error - that is how I got to this PR 😄). Specifically in Julia 1.7, since addition of
while after your PR:
The point is that, in general you call addition like |
Your package evaluation job has completed - possible new issues were detected. A full report can be found here. |
@@ -512,10 +512,10 @@ julia> identity("Well, what did you expect?") | |||
""" | |||
identity(@nospecialize x) = x | |||
|
|||
+(x) = x | |||
+(x::Number) = x | |||
-(x) = Int8(-1)*x |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Kind of seems like all of these other type-unlimited arithmetic fallbacks should also be done away with. Issue filed: #45463.
…) (#45489) * Revert "Remove type-unlimited unary `+` and `*` (#45320)" This reverts commit 990b1f3. * Revert "Generalize or restrict a few basic operators (#44564)" This reverts commit cf1f717. Also fixes merge conflicts in stdlib/LinearAlgebra/test/generic.jl Co-authored-by: Daniel Karrasch <[email protected]>
…and JuliaLang#45320) (JuliaLang#45489) * Revert "Remove type-unlimited unary `+` and `*` (JuliaLang#45320)" This reverts commit 990b1f3. * Revert "Generalize or restrict a few basic operators (JuliaLang#44564)" This reverts commit cf1f717. Also fixes merge conflicts in stdlib/LinearAlgebra/test/generic.jl Co-authored-by: Daniel Karrasch <[email protected]>
…and JuliaLang#45320) (JuliaLang#45489) * Revert "Remove type-unlimited unary `+` and `*` (JuliaLang#45320)" This reverts commit 990b1f3. * Revert "Generalize or restrict a few basic operators (JuliaLang#44564)" This reverts commit cf1f717. Also fixes merge conflicts in stdlib/LinearAlgebra/test/generic.jl Co-authored-by: Daniel Karrasch <[email protected]>
Addresses #44564 (comment).