Skip to content

compiler assertion failure when unwrapping ?@Frame() #5706

@tgschultz

Description

@tgschultz
fn frameFunc() void {
    suspend;
    suspend;
}

test "unwrap @Frame()" {
    var frame: ?@Frame(frameFunc) = null;
    frame = async frameFunc();
    if(frame) |f| resume f;
    resume frame.?;
}
Code Generation [1/708] when analyzing /root/testing/test.zig:134:13 in compiler source at /deps/zig/src/codegen.cpp:1811: assertion failed. This is a bug in the Zig compiler.
Unable to dump stack trace: debug info stripped
Aborted

Note: the line in question is the assignment to frame, however this also fails when unwrapping with an if statement or the unconditional unwrap.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugObserved behavior contradicts documented or intended behavior

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions