The program is ill formed, and semantic analysis detects the issue, but because errors are checked after lowering, it hits an assert when spitting out the cpp code, causing the crash. We could, of course, check for errors generated by semantic analysis before lowering, but this pr simply swaps out the assert for a return, so as to maintain the current structure.
Thanks! I tried to push an alternate solution to this branch but I don't have permission, so I'll apply the solution on main separately instead of taking this PR, and reference this PR. Again, thanks for this.
Patches #1123
The program is ill formed, and semantic analysis detects the issue, but because errors are checked after lowering, it hits an assert when spitting out the cpp code, causing the crash. We could, of course, check for errors generated by semantic analysis before lowering, but this pr simply swaps out the assert for a return, so as to maintain the current structure.