Skip to content

Commit

Permalink
improve return type "this"
Browse files Browse the repository at this point in the history
  • Loading branch information
wizza-smile committed Mar 20, 2015
1 parent 3215e1a commit 90df23d
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions libs/codeintel2/tree_php.py
Original file line number Diff line number Diff line change
Expand Up @@ -955,9 +955,10 @@ def _hit_from_citdl(self, expr, scoperef, defn_only=False):
##if is function and return is in (this, )
##return initial class
if new_hit[0].get("ilk") == "function" and new_hit[0].get("returns") in ("this",):
nconsumed = 2
new_hit = hit
if self.trg.form == TRG_FORM_CALLTIP:
#now get the resolve the calltip on returned class directly!
if self.trg.form == TRG_FORM_CALLTIP and len(remaining_tokens) <= 1:
#now get the resolve the calltip on the last hit class directly!
remaining_tokens = [remaining_tokens[-1]]
new_hit, nconsumed = self._hit_from_getattr(remaining_tokens, *hit)

Expand Down

0 comments on commit 90df23d

Please sign in to comment.