Commit b4f3b150 authored by Tom Niget's avatar Tom Niget

Prioritize errors from __main__ in multipass analysis

parent e7c1d806
......@@ -42,7 +42,7 @@ class ScoperVisitor(NodeVisitorSeq):
self.visit_function_definition(node, rtype)
except CompileError as e:
new_list.append((node, rtype))
if not exc:
if not exc or getattr(node, "is_main", False):
exc = e
if len(new_list) == len(old_list):
raise exc
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment