Closed
Description
The source locations are nowhere near the semicolon. The implementation should know when a semicolon is not needed, so the error message can be more to the point.
Minimal reproducer (https://godbolt.org/z/5Eovbx4Yb):
g: () = { }
f: () = {
for v* | all next log() do :(e) = {
foo();
bar*;
};
g();
}
Commands:
cppfront x.cpp2
Expected result: A diagnostic indicating to remove accidental semicolon.
Actual result and error:
x.cpp2(2,9): error: ill-formed initializer (at '{')
x.cpp2(2,1): error: unexpected text at end of Cpp2 code section (at 'f')
x.cpp2(1,0): error: parse failed for section starting here
Metadata
Metadata
Assignees
Labels
No labels