Open bluetarpmedia opened 4 months ago
Reduced to:
f:() return 0
: () -> int = {}
Notice the following code does not trigger ICE but reports an error at first line:
f:() return 0
g = 1;
The situation seems to be that cppfront
tried to continue to parse after encountering an error "missing `;' after return" and then ran into an ICE:
Maybe we should just give up parsing at that point and raise an error? Ping @hsutter.
Describe the bug Cppfront crashes with an ICE when given some invalid Cpp2 code.
To Reproduce Run cppfront on this code. The unnamed function / lambda expression has a syntax error.
Cppfront reports:
Repro on Godbolt