The code and syntax for this is actually already there ("completed" in 152d9943365ce8bdee2e58eb2a0370bd53005c29), but I took it out in 669814eb0ae33d462cebb60cd75511d2c4efd98b.
The problem is break completely breaks (ROFL) reference counting, because break ing out of a loop forgoes any inserted drops. The fix might be to rewrite how codegen handles loops, or to rewrite how codegen handles drops. We may even need to rewrite most of codegen.
The code and syntax for this is actually already there ("completed" in 152d9943365ce8bdee2e58eb2a0370bd53005c29), but I took it out in 669814eb0ae33d462cebb60cd75511d2c4efd98b.
The problem is
break
completely breaks (ROFL) reference counting, becausebreak
ing out of a loop forgoes any inserted drops. The fix might be to rewrite how codegen handles loops, or to rewrite how codegen handles drops. We may even need to rewrite most of codegen.