@@ -670,10 +670,12 @@ func getCandidateOrTypeInfo(info *argumentListInfo, c *checker.Checker, sourceFi
670670 if onlyUseSyntacticOwners && ! isSyntacticOwner (startingToken , info .invocation .callInvocation .node , sourceFile ) {
671671 return nil
672672 }
673+
673674 resolvedSignature , candidates := checker .GetResolvedSignatureForSignatureHelp (info .invocation .callInvocation .node , info .argumentCount , c )
674675 if len (candidates ) == 0 {
675676 return nil
676677 }
678+
677679 return & CandidateOrTypeInfo {
678680 candidateInfo : & candidateInfo {
679681 candidates : candidates ,
@@ -687,9 +689,11 @@ func getCandidateOrTypeInfo(info *argumentListInfo, c *checker.Checker, sourceFi
687689 if ast .IsIdentifier (called ) {
688690 container = called .Parent
689691 }
692+
690693 if onlyUseSyntacticOwners && ! containsPrecedingToken (startingToken , sourceFile , container ) {
691694 return nil
692695 }
696+
693697 candidates := getPossibleGenericSignatures (called , info .argumentCount , c )
694698 if len (candidates ) != 0 {
695699 return & CandidateOrTypeInfo {
@@ -699,11 +703,17 @@ func getCandidateOrTypeInfo(info *argumentListInfo, c *checker.Checker, sourceFi
699703 },
700704 }
701705 }
702- symbol := c .GetSymbolAtLocation (called )
703- return & CandidateOrTypeInfo {
704- typeInfo : symbol ,
706+
707+ if symbol := c .GetSymbolAtLocation (called ); symbol != nil {
708+ return & CandidateOrTypeInfo {
709+ typeInfo : symbol ,
710+ }
705711 }
712+
713+ // This can happen in the case of an unresolved symbol.
714+ return nil
706715 }
716+
707717 if info .invocation .contextualInvocation != nil {
708718 return & CandidateOrTypeInfo {
709719 candidateInfo : & candidateInfo {
0 commit comments