1.1 --- a/translator.py Sun Jan 15 17:37:00 2023 +0100
1.2 +++ b/translator.py Fri Sep 01 19:35:20 2023 +0200
1.3 @@ -1619,7 +1619,8 @@
1.4 # function names to references.
1.5
1.6 elif n.name.startswith("$L") or n.name.startswith("$op") or \
1.7 - n.name.startswith("$seq") or n.name.startswith("$print"):
1.8 + n.name.startswith("$seq") or n.name.startswith("$print") or \
1.9 + n.name == "$loop_exit":
1.10
1.11 ref, paths = self.importer.get_module(self.name).special[n.name]
1.12 return TrResolvedNameRef(n.name, ref)
1.13 @@ -1736,7 +1737,7 @@
1.14 else:
1.15 exc = self.process_structure_node(n.expr1)
1.16
1.17 - if isinstance(exc, TrInstanceRef):
1.18 + if isinstance(exc, TrInstanceRef) or exc.is_well_defined_instance():
1.19 self.writestmt("__Raise(%s);" % exc)
1.20 else:
1.21 self.writestmt("__Raise(__ensure_instance(%s));" % exc)