Skip to content

Compiler assertion failure when assigning to nullable frame variable #5604

@adrusi

Description

@adrusi

Found what looks like a compiler bug.

compiler_error.zig:

fn a() void {
    suspend;
}

pub fn main() void {
    var frame: ?@Frame(a) = async a();
}
$ zig version                   
0.6.0+e7207bc26
$ zig run compiler_error.zig 
when analyzing /home/adrusi/posh/src/compiler_error.zig:6:29 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
zsh: abort      ~/zig-linux-x86_64-0.6.0+e7207bc26/zig run src/compiler_error.zig

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