Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

add compile error for copying an async frame #3074

Open
andrewrk opened this issue Aug 16, 2019 · 0 comments
Open

add compile error for copying an async frame #3074

andrewrk opened this issue Aug 16, 2019 · 0 comments
Labels
enhancement Solving this issue will likely involve adding new logic or components to the codebase.
Milestone

Comments

@andrewrk
Copy link
Member

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.

@andrewrk andrewrk added enhancement Solving this issue will likely involve adding new logic or components to the codebase. stage1 The process of building from source via WebAssembly and the C backend. labels Aug 16, 2019
@andrewrk andrewrk added this to the 0.5.0 milestone Aug 16, 2019
@andrewrk andrewrk modified the milestones: 0.5.0, 0.6.0 Sep 20, 2019
@andrewrk andrewrk modified the milestones: 0.6.0, 0.7.0 Feb 11, 2020
@andrewrk andrewrk modified the milestones: 0.7.0, 0.8.0 Oct 14, 2020
@andrewrk andrewrk modified the milestones: 0.8.0, 0.9.0 Nov 6, 2020
@andrewrk andrewrk modified the milestones: 0.9.0, 0.10.0 May 19, 2021
@Vexu Vexu removed stage1 The process of building from source via WebAssembly and the C backend. labels Dec 8, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement Solving this issue will likely involve adding new logic or components to the codebase.
Projects
None yet
Development

No branches or pull requests

2 participants