Ticket #1702 (new bug)
Cannot resume dead coroutine
| Reported by: | hanekomu | Owned by: | |
|---|---|---|---|
| Priority: | normal | Milestone: | |
| Component: | none | Version: | 2.5.0 |
| Severity: | medium | Keywords: | |
| Cc: | Language: | ||
| Patch status: | Platform: |
Description
.sub 'MyCoro'
.yield(1)
.yield(2)
.yield(3)
.return(4)
.end
.sub 'main' :main
$I0 = MyCoro()
say $I0
$I0 = MyCoro()
say $I0
$I0 = MyCoro()
say $I0
$I0 = MyCoro()
say $I0
$I0 = MyCoro()
say $I0
$I0 = MyCoro()
say $I0
$I0 = MyCoro()
say $I0
.end
prints:
1 2 3 4 Cannot resume dead coroutine. current instr.: 'main' pc 35 (coro.pir:11)
on parrot-2.5.0-devel on Mac OS X 10.5.8.
I think the subroutine should restart, since the user of the sub doesn't care whether it's a coroutine or not.
Change History
Note: See
TracTickets for help on using
tickets.
