You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The Body::Any part is red and I have read that this is very bad for performance. Since there is no rules on what I should do to avoid red marks, it's hard to tell if this is a bug or not. IMHO, multiplication of a value of type Bool by two should return an Int, summing Ints results in Int, so the result must be Vector{Int}. Am I not right? Why cannot julia infer the type?
UPD:
Trying @code_warntype foo(data, sum, []) correctly returns Vector{Int} for the result type.
The text was updated successfully, but these errors were encountered:
My
versioninfo()
:Consider this function:
Now run
@code_warntype
as follows:The
Body::Any
part is red and I have read that this is very bad for performance. Since there is no rules on what I should do to avoid red marks, it's hard to tell if this is a bug or not. IMHO, multiplication of a value of typeBool
by two should return anInt
, summingInt
s results inInt
, so the result must beVector{Int}
. Am I not right? Why cannot julia infer the type?UPD:
Trying
@code_warntype foo(data, sum, [])
correctly returnsVector{Int}
for the result type.The text was updated successfully, but these errors were encountered: