Is `resume` a reserved word?

I’ve run into this in two different projects now. The following fails to compile:

// Doesn't compile
pub fn resume() void {}

// This does
pub fn @"resume"() void {}

Error:

install
└─ install repro
   └─ compile exe repro debug native 1 errors
src/root.zig:12:8: error: expected '(', found 'resume'
pub fn resume() void {}
       ^~~~~~
error: 1 compilation errors
failed command: /home/southporter/.local/share/mise/installs/zig/master/zig build-exe -ODebug --dep repro -Mroot=src/main.zig -Mrepro=src/root.zig --cache-dir .zig-cache --global-cache-dir /home/southporter/.cache/zig --name repro --zig-lib-dir /home/southporter/.local/share/mise/installs/zig/master/lib/ --listen=-

If I escape the resume name with the @"" form, then it compiles correctly. Is there somewhere in the language specification where resume is a keyword?

I think that is from async functions with suspend and resume keywords (removed in 0.11.0) Documentation - The Zig Programming Language

Looks like resume (and suspend) are still reserved keywords though Documentation - The Zig Programming Language

1 Like

Tracking issue:

1 Like