-
Notifications
You must be signed in to change notification settings - Fork 5
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
Changed meaning of .+= in Julia 0.5 #1
Comments
Many thanks for the heads up! I also don't think it is an issue for me but I will look out for it once I switch to 0.5 |
Looks like you do have an ambiguity failure in your tests now http://pkg.julialang.org/logs/ValueOrientedRiskManagementInsurance_0.5.log |
Similarly for After JuliaLang/julia#17546 is merged, this will turn into |
Any such errors have been corrected in the current code |
Your code uses
x .+= y
, so you should know that in Julia 0.5 this has changed meaning to be equivalent tobroadcast!(identity, x, x .+ y)
, so that it mutates thex
array (see JuliaLang/julia#17510 … in Julia 0.6 the whole operation will occur in-place without temporaries). So.+
should only be used if the left-hand side is a mutable array, and you don't mind mutating it.At first glance, this looks like it is okay for you, because you use it in
pl.profit .+= plbu.profit
and similar cases where it looks like you want to work in-place anyway? But if it were a problem you could always change it to+=
.The text was updated successfully, but these errors were encountered: