mirror of
https://github.com/apple/swift.git
synced 2025-12-21 12:14:44 +01:00
[CS] Increase the score for implicit global actor function conversion
This commit is contained in:
@@ -3020,6 +3020,13 @@ ConstraintSystem::matchFunctionTypes(FunctionType *func1, FunctionType *func2,
|
||||
return getTypeMatchFailure(locator);
|
||||
} else if (kind < ConstraintKind::Subtype) {
|
||||
return getTypeMatchFailure(locator);
|
||||
} else {
|
||||
// It is possible to convert from a function without a global actor to a
|
||||
// similar function type that does have a global actor. But, since there
|
||||
// is a function conversion going on here, let's increase the score to
|
||||
// avoid ambiguity when solver can also match a global actor matching
|
||||
// function type.
|
||||
increaseScore(SK_FunctionConversion);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user