Commit b59d4011 authored by Tom Niget's avatar Tom Niget

Prioritize errors from __main__ in multipass analysis

parent 8ce64ec2
......@@ -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