Open
Description
Describe the bug
Cppfront crashes with an assertion on this code:
h: (s: std::string, inout m: std::map<const int,std::string> ) -> std::string
= {
do { } while false;
for m do (_) {
return :() -> std::string = (s + m[0])$;
}
}
To Reproduce
Go to the Godbolt link above, or try to compile this code.
Additional context
The problem is in semantic analysis in sema::find_definite_last_uses
while popping out of any containing scope of the last use. We skip over the actual start of the scope and find the end of a previous loop, which causes an assertion. Sadly I don't yet know the code quite intimately enough to know for sure what the fix is.
Metadata
Metadata
Assignees
Labels
Projects
Milestone
Relationships
Development
No branches or pull requests
Activity