forked from VimPlug/jedi
fix for the recursive ArrayInstance issues.
This commit is contained in:
@@ -396,13 +396,10 @@ class ArrayInstance(pr.Base):
|
|||||||
if isinstance(typ, Instance) and len(typ.var_args):
|
if isinstance(typ, Instance) and len(typ.var_args):
|
||||||
array = typ.var_args[0]
|
array = typ.var_args[0]
|
||||||
if isinstance(array, ArrayInstance):
|
if isinstance(array, ArrayInstance):
|
||||||
# prevent recursions
|
# Certain combinations can cause recursions, see tests.
|
||||||
# TODO compare Modules
|
if not self._evaluator.recursion_detector.push_stmt(self.var_args):
|
||||||
if self.var_args.start_pos != array.var_args.start_pos:
|
|
||||||
items += array.iter_content()
|
items += array.iter_content()
|
||||||
else:
|
self._evaluator.recursion_detector.pop_stmt()
|
||||||
debug.warning('ArrayInstance recursion %s', self.var_args)
|
|
||||||
continue
|
|
||||||
items += get_iterator_types([typ])
|
items += get_iterator_types([typ])
|
||||||
|
|
||||||
# TODO check if exclusion of tuple is a problem here.
|
# TODO check if exclusion of tuple is a problem here.
|
||||||
|
|||||||
Reference in New Issue
Block a user