Skip to content

Syntax error on code comments #20928

Description

@mahdisharifithedev

Zig Version

0.14.0-dev.839+a931bfada

Steps to Reproduce and Observed Behavior

Here's the code for x.zig:

/// Comments/// Comments/// Comments/// Commentspubconstfile_index_alloc: c_uint=~@as(c_uint, 0);
/// IOSQE_BUFFER_SELECT/// Comments/// Comments/// Commentspubconstcqe_buffer_shift=16;
/// skip updating fd indexes set to this value in the fd tablepubconstregister_files_skip: c_int=-2;

And y.zig:

/// Comments/// CommentspubconstMask=packedstruct {
--snip--/// blocksblocks: bool=false,
}

Here's the error:

test
└─ install start_start1-void_tests
└─ zig build-exe start_start1-void_tests Debug native 2 errors
x.zig:13:24: error: expected type expression, found 'invalid token'
/// IOSQE_BUFFER_SELECT
^
y.zig:46:26: error: expected type expression, found 'invalid token'
blocks: bool = false,
^
error: the following command failed with 2 compilation errors:
/home/raymond/.zvm/master/zig build-exe -ODebug --dep vortex -Mroot=/home/raymond/projects/x/tests/start/start1-void.zig -Mvortex=/home/raymond/projects/x/src/root.zig --cache-dir /home/raymond/projects/x/.zig-cache --global-cache-dir /home/raymond/.cache/zig --name start_start1-void_tests --zig-lib-dir /home/raymond/.zvm/master/lib/ --listen=-

Expected Behavior

Should have compiled it.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugObserved behavior contradicts documented or intended behavior

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions