1
0
forked from VimPlug/jedi

Fix a bug in call_of_name.

It was possible to get a NAME(x) result when calling call_of_name on x, which shouldn't happen. It should just return x.
This commit is contained in:
Dave Halter
2015-06-29 11:27:10 +02:00
parent 5d9fff50af
commit a014d4fd38
2 changed files with 19 additions and 0 deletions

View File

@@ -86,6 +86,9 @@ def call_of_name(name, cut_own_trailer=False):
par = name
if tree.is_node(par.parent, 'trailer'):
par = par.parent
if par.children[0] in ('(', '['):
# The trailer is not a NAME.NAME trailer, but a call to something.
return name
power = par.parent
if tree.is_node(power, 'power') and power.children[0] != name \