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
@resumablefunctiontest_for(a::Int=0; b::Int=a+1) ::Intfor i in1:10@yield a
a, b = b, a+b
endendcollect(test_for(4))
this fails on 1.1. However this works:
@resumablefunctiontest_for(a::Int=0; b::Int=a+1, n::Int=10) ::Intfor i in1:n
@yield a
a, b = b, a+b
endendcollect(test_for(4)) # works
An issue seems to be with the transform_for with the line $next = iterate... where it looks like the right-hand-side gives a nothing and the left-hand side expects a Tuple{Int, Int} (I don't know enough about macros to know what causes this assignment to fail). The following "fixes" it:
@resumablefunctiontest_try(io)
try
a =1@yield a
a =2
c =@yield a
println(io,c)
catch except
println(io,except)
d =@yieldprintln(io,d)
finallyprintln(io,"Always")
endend
fails with error syntax: Attempt to jump into catch block. Not sure what's going on there.
The text was updated successfully, but these errors were encountered:
test_for should work now in master
test_try is modified, Julia v1.1 does no longer support @goto into a catch statement... so I removed this feature...
Related to the Mega-Issue JuliaLang/julia#30374.
test_for
this fails on 1.1. However this works:
An issue seems to be with the
transform_for
with the line$next = iterate...
where it looks like the right-hand-side gives anothing
and the left-hand side expects aTuple{Int, Int}
(I don't know enough about macros to know what causes this assignment to fail). The following "fixes" it:test_try
fails with error
syntax: Attempt to jump into catch block
. Not sure what's going on there.The text was updated successfully, but these errors were encountered: