-
-
Notifications
You must be signed in to change notification settings - Fork 5.7k
Closed
Description
function t1()
p=zeros(2)
m=minimum(p[i] for i=1:2)
p=zeros(2)
return m
end
function t2()
p=zeros(2)
m=minimum(p[i] for i=1:2)
return m
end@code_warntype t1() will show it is type unstable. However, t2 is type stable.
Maybe related to #18695. But looks strange because t1 and t2 are indeed the same.
Metadata
Metadata
Assignees
Labels
No labels