Lokasi ngalangkungan proxy:   [ UP ]  
[Ngawartoskeun bug]   [Panyetelan cookie]                
Skip to content

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

Closed

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.

Activity

  1. added
    bug
    on Nov 15, 2023
  2. gregmarr commented on Nov 15, 2023

    @gregmarr
    Contributor

    This check was added in 243d03d

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

    bug

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions