File tree Expand file tree Collapse file tree 1 file changed +6
-2
lines changed Expand file tree Collapse file tree 1 file changed +6
-2
lines changed Original file line number Diff line number Diff line change @@ -380,11 +380,15 @@ static Constraint *determineBestChoicesInContext(
380
380
scoreCandidateMatch = [&](GenericSignature genericSig,
381
381
Type candidateType, Type paramType,
382
382
MatchOptions options) -> double {
383
+ auto areEqual = [](Type a, Type b) {
384
+ return a->getDesugaredType ()->isEqual (b->getDesugaredType ());
385
+ };
386
+
383
387
if (options.contains (MatchFlag::ExactOnly))
384
- return candidateType-> isEqual ( paramType) ? 1 : 0 ;
388
+ return areEqual (candidateType, paramType) ? 1 : 0 ;
385
389
386
390
// Exact match between candidate and parameter types.
387
- if (candidateType-> isEqual ( paramType))
391
+ if (areEqual (candidateType, paramType))
388
392
return options.contains (MatchFlag::Literal) ? 0.3 : 1 ;
389
393
390
394
if (options.contains (MatchFlag::Literal))
You can’t perform that action at this time.
0 commit comments