Skip to content
This repository was archived by the owner on Mar 23, 2023. It is now read-only.

Commit bd12d52

Browse files
author
Dylan Trotter
committed
Replace return with continue so that except handlers get executed.
1 parent d8cb498 commit bd12d52

1 file changed

Lines changed: 3 additions & 3 deletions

File tree

compiler/stmt.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -225,10 +225,10 @@ def visit_ClassDef(self, node):
225225
tmpl = textwrap.dedent("""\
226226
}).Eval(πF, πF.Globals(), nil, nil)
227227
if πE != nil {
228-
\treturn nil, πE
228+
\tcontinue
229229
}
230230
if $meta, πE = $cls.GetItem(πF, $metaclass_str.ToObject()); πE != nil {
231-
\treturn nil, πE
231+
\tcontinue
232232
}
233233
if $meta == nil {
234234
\t$meta = πg.TypeType.ToObject()
@@ -342,7 +342,7 @@ def visit_If(self, node):
342342
with self.block.alloc_temp('bool') as is_true:
343343
self.writer.write_tmpl(textwrap.dedent("""\
344344
if $is_true, πE = πg.IsTrue(πF, $cond); πE != nil {
345-
\treturn nil, πE
345+
\tcontinue
346346
}
347347
if $is_true {
348348
\tgoto Label$label

0 commit comments

Comments
 (0)