Skip to content

Compile error: extra capture in for loop #2

@ritalin

Description

@ritalin

From zig version, 0.11, capturing implicit array index is compile error.

This error is reported at https://github.com/dmgk/zig-uuid/blob/master/uuid.zig#L82 and https://github.com/dmgk/zig-uuid/blob/master/uuid.zig#L96 .

It could be resolved this error changing explicitly index.

// #L82
inline for (encoded_pos, 0..) |i, j| {
    // (snip)
}

// #L96 ditto

Environment

  • Platform: MacOS 13.3(22E252)
  • Zig version: 0.11.0-dev.2969+855493bb8

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions