Closed
Description
Describe the bug
Cppfront reports an incorrect error when parsing an ill-formed multi-statement function missing its enclosing braces.
To Reproduce
Run cppfront on this ill-formed code:
func: () =
message := "Hello world\n";
std::cout << message;
Cppfront reports: error: local variable message is not used; consider changing its name to '_' to make it explicitly anonymous, or removing it entirely if its side effects are not needed
Another:
func: () =
std::cout << "Hello ";
std::cout << " world\n";
Cppfront reports: error: pure-cpp2 switch disables Cpp1 syntax
But in these cases I'd expect a syntax error indicating the block is missing.