hsutter / cppfront

A personal experimental C++ Syntax 2 -> Syntax 1 compiler
Other
5.24k stars 223 forks source link

[BUG] error: local variable not used after using declaration but in fact it is #962

Closed wolfseifert closed 5 months ago

wolfseifert commented 5 months ago

After pulling in 510eae80bf3b92c7e210817c329e4b417d0012ec:

prntln: (s: ::std::string) = {
  using ::std;
  cout << "A: (s)$" << endl;
}

does not transpile

inherit.cpp2(1,10): error: local variable 's' is not used; consider changing its name to '_' to make it explicitly anonymous, or removing it entirely if its side effects are not needed
hsutter commented 5 months ago

Thanks! @JohelEGP could you take a look at this?