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): ...@@ -42,7 +42,7 @@ class ScoperVisitor(NodeVisitorSeq):
self.visit_function_definition(node, rtype) self.visit_function_definition(node, rtype)
except CompileError as e: except CompileError as e:
new_list.append((node, rtype)) new_list.append((node, rtype))
if not exc: if not exc or getattr(node, "is_main", False):
exc = e exc = e
if len(new_list) == len(old_list): if len(new_list) == len(old_list):
raise exc 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