nsf / gocode

An autocompletion daemon for the Go programming language
MIT License
5.01k stars 656 forks source link

Fix failure in test 0055 introduced by: d7aee8965 #511

Closed charlievieth closed 5 years ago

charlievieth commented 6 years ago

Commit d7aee8965 broke test 0055 as setting the decl_visited in decl.find_child_and_in_embedded() prevents other type inference methods from running. This commit introduces a new decl_flags constant, decl_visited_find_child_and_in_embedded, for decl. find_child_and_in_embedded() so other type inference methods may still run while guarding against infinite recursion.

Also, the name of the new constant decl_visited_find_child_and_in_embedded and the associated decl methods are pretty long. Please feel free to change it or offer suggestions for a better name and I'll update the PR.