I hope that there is something I am missing, or making a mistake in the following example:
r = rand(10) test1(r) = sum( t^2 for t in r ) test2(r)= sum( [t^2 for t in r] ) @code_warntype test1(r) # return type Any is inferred @code_warntype test2(r) # return type Float64 is inferred This caused a problem for me, beyond execution speed: I used a generator to create the elements for a comprehension, since the type was not inferred the zero-element could not be created. Is this a known issue?