fix: close upvalues before fiber completion and add closure tests
Move upvalue closing logic from the else branch to before the fiber completion check to ensure upvalues are properly closed when a fiber finishes. Add test cases for closure behavior across fiber yields and for Fiber.create argument type validation.
This commit is contained in:
@@ -7,6 +7,3 @@ fiber.run // expect: fiber
|
||||
IO.print("after") // expect: after
|
||||
|
||||
// TODO: Test handles error if fiber tries to run itself.
|
||||
// TODO: Test create is passed right argument type.
|
||||
// TODO: Test closing over stuff in fiber function.
|
||||
// TODO: Test running a finished fiber.
|
||||
|
||||
Reference in New Issue
Block a user