-
-
Notifications
You must be signed in to change notification settings - Fork 3.1k
add compile error for copying an async frame #3074
Copy link
Copy link
Open
Labels
enhancementSolving this issue will likely involve adding new logic or components to the codebase.Solving this issue will likely involve adding new logic or components to the codebase.
Milestone
Description
export fn a() void {
const f = async func();
var f2 = f;
resume f2;
}
fn func() void {
suspend;
}Expected output: error: cannot copy @Frame(func)
Actual output: builds successfully
This cannot work because local variables can, for example, be pointers to each other. Copying the frame would break this.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
enhancementSolving this issue will likely involve adding new logic or components to the codebase.Solving this issue will likely involve adding new logic or components to the codebase.