feat: add fiber.isDone property and runtime error checks for finished fiber operations
Add a new `isDone` native method to the Fiber class that returns true when the fiber has no remaining frames. Replace TODO comments with proper runtime error handling in `fiber_run`, `fiber_run1`, `fiber_yield`, and `fiber_yield1` to prevent running finished fibers or yielding from the main fiber. Include test cases verifying the new property and error conditions.
This commit is contained in:
@@ -0,0 +1 @@
|
||||
Fiber.yield(1) // expect runtime error: No fiber to yield to.
|
||||
Reference in New Issue
Block a user