Skip to content

Wrong error location when .? is misplaced in for (...) |*x| body #10674

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
fogti opened this issue Jan 23, 2022 · 0 comments
Closed

Wrong error location when .? is misplaced in for (...) |*x| body #10674

fogti opened this issue Jan 23, 2022 · 0 comments
Labels
bug Observed behavior contradicts documented or intended behavior stage1 The process of building from source via WebAssembly and the C backend.
Milestone

Comments

@fogti
Copy link
Contributor

fogti commented Jan 23, 2022

Zig Version

0.9.0-dev.c9ae24503dc8da2e59f46619695bf4eb863fb3ac

Steps to Reproduce

test "x" {
  var items = [_]u8 { 1, 2, 3 };
  for (items) |*i| {
    i.?.* = 1;
  }
}

Expected Behavior

./src/main.zig:7:5: error: expected optional type, found '*u8'
    i.?.* = 1;
    ^

Actual Behavior

./src/main.zig:6:17: error: expected optional type, found '*u8'
  for (items) |*i| {
                ^
@fogti fogti added the bug Observed behavior contradicts documented or intended behavior label Jan 23, 2022
@Vexu Vexu added the stage1 The process of building from source via WebAssembly and the C backend. label Jan 29, 2022
@Vexu Vexu added this to the 0.11.0 milestone Jan 29, 2022
wooster0 added a commit to wooster0/zig that referenced this issue May 28, 2023
wooster0 added a commit to wooster0/zig that referenced this issue May 28, 2023
wooster0 added a commit to wooster0/zig that referenced this issue May 28, 2023
wooster0 added a commit to wooster0/zig that referenced this issue May 28, 2023
wooster0 added a commit to wooster0/zig that referenced this issue May 28, 2023
wooster0 added a commit to wooster0/zig that referenced this issue May 28, 2023
wooster0 added a commit to wooster0/zig that referenced this issue May 28, 2023
wooster0 added a commit to wooster0/zig that referenced this issue May 28, 2023
wooster0 added a commit to wooster0/zig that referenced this issue May 28, 2023
wooster0 added a commit to wooster0/zig that referenced this issue May 29, 2023
wooster0 added a commit to wooster0/zig that referenced this issue May 29, 2023
wooster0 added a commit to wooster0/zig that referenced this issue May 29, 2023
wooster0 added a commit to wooster0/zig that referenced this issue May 29, 2023
wooster0 added a commit to wooster0/zig that referenced this issue May 29, 2023
wooster0 added a commit to wooster0/zig that referenced this issue Jun 2, 2023
wooster0 added a commit to wooster0/zig that referenced this issue Jun 6, 2023
wooster0 added a commit to wooster0/zig that referenced this issue Jun 13, 2023
wooster0 added a commit to wooster0/zig that referenced this issue Jun 15, 2023
wooster0 added a commit to wooster0/zig that referenced this issue Jun 15, 2023
wooster0 added a commit to wooster0/zig that referenced this issue Jun 15, 2023
wooster0 added a commit to wooster0/zig that referenced this issue Jun 15, 2023
wooster0 added a commit to wooster0/zig that referenced this issue Jun 15, 2023
wooster0 added a commit to wooster0/zig that referenced this issue Jun 15, 2023
wooster0 added a commit to wooster0/zig that referenced this issue Jun 15, 2023
wooster0 added a commit to wooster0/zig that referenced this issue Jun 15, 2023
wooster0 added a commit to wooster0/zig that referenced this issue Jun 15, 2023
wooster0 added a commit to wooster0/zig that referenced this issue Jun 15, 2023
wooster0 added a commit to wooster0/zig that referenced this issue Jun 17, 2023
wooster0 added a commit to wooster0/zig that referenced this issue Jun 18, 2023
wooster0 added a commit to wooster0/zig that referenced this issue Jun 19, 2023
wooster0 added a commit to wooster0/zig that referenced this issue Jun 19, 2023
wooster0 added a commit to wooster0/zig that referenced this issue Jun 20, 2023
wooster0 added a commit to wooster0/zig that referenced this issue Jun 27, 2023
wooster0 added a commit to wooster0/zig that referenced this issue Jun 27, 2023
@andrewrk andrewrk modified the milestones: 0.14.0, 0.11.0 Jul 3, 2023
TUSF pushed a commit to TUSF/zig that referenced this issue May 9, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Observed behavior contradicts documented or intended behavior stage1 The process of building from source via WebAssembly and the C backend.
Projects
None yet
Development

No branches or pull requests

3 participants