Fix issues with unreachable flows.

This benefits static analysis as well as autocompletion: Unreachable code (things like code within 'if 0:') should still be resolveable.
This commit is contained in:
Dave Halter committed 2014-09-03 00:05:37 +02:00
1 parent ea5b98905e
commit bcc84820fe
4 files changed
+37 -3

No files matched your search

+2 -1
View File
@@ -106,7 +106,8 @@ class NameFinder(object):
else:
check = flow_analysis.break_check(self._evaluator,
name_list_scope,
er.wrap(self._evaluator, scope))
er.wrap(self._evaluator, scope),
self.scope)
if check is not flow_analysis.UNREACHABLE:
result.append(name)
if check is flow_analysis.REACHABLE: