Skip to content

Commit acbc9aa

Browse files
authored
Attempt to fix completion crash (#16267)
2 parents e16ff26 + 387741a commit acbc9aa

File tree

1 file changed

+13
-9
lines changed

1 file changed

+13
-9
lines changed

compiler/src/dotty/tools/dotc/core/Denotations.scala

Lines changed: 13 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -644,15 +644,19 @@ object Denotations {
644644

645645
def atSignature(sig: Signature, targetName: Name, site: Type, relaxed: Boolean)(using Context): SingleDenotation =
646646
val situated = if site == NoPrefix then this else asSeenFrom(site)
647-
val sigMatches = sig.matchDegree(situated.signature) match
648-
case FullMatch =>
649-
true
650-
case MethodNotAMethodMatch =>
651-
// See comment in `matches`
652-
relaxed && !symbol.is(JavaDefined)
653-
case ParamMatch =>
654-
relaxed
655-
case noMatch =>
647+
val sigMatches =
648+
try
649+
sig.matchDegree(situated.signature) match
650+
case FullMatch =>
651+
true
652+
case MethodNotAMethodMatch =>
653+
// See comment in `matches`
654+
relaxed && !symbol.is(JavaDefined)
655+
case ParamMatch =>
656+
relaxed
657+
case noMatch =>
658+
false
659+
catch case ex: MissingType =>
656660
false
657661
if sigMatches && symbol.hasTargetName(targetName) then this else NoDenotation
658662

0 commit comments

Comments
 (0)