mirror of
https://github.com/apple/swift.git
synced 2025-12-21 12:14:44 +01:00
Merge pull request #65668 from kavon/noncopyable-metatypes-redo
Noncopyable metatypes redo
This commit is contained in:
@@ -3827,8 +3827,8 @@ ConstraintSystem::matchExistentialTypes(Type type1, Type type2,
|
||||
return getTypeMatchAmbiguous();
|
||||
}
|
||||
|
||||
// move-only types cannot match with any existential types.
|
||||
if (type1->isPureMoveOnly()) {
|
||||
// move-only types (and their metatypes) cannot match with existential types.
|
||||
if (type1->getMetatypeInstanceType()->isPureMoveOnly()) {
|
||||
// tailor error message
|
||||
if (shouldAttemptFixes()) {
|
||||
auto *fix = MustBeCopyable::create(*this, type1,
|
||||
|
||||
Reference in New Issue
Block a user