Skip to content

Error: local variable is not used, but in fact it is #832

Closed
@wolfseifert

Description

@wolfseifert

The transpiler emits "error: local variable is not used", but in fact it is used.

Compiling

main: () = {
  b := true;
  i := 0;
  while i < 3 && b next i++ {
    std::cout << i << std::endl;
  }
}

yields

whiles.cpp2(2,3): error: local variable b is not used; consider changing its name to '_' to make it explicitly anonymous, or removing it entirely if its side effects are not needed

This happens at least since git version 11f2dbb.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions