mirror of
https://github.com/apple/swift.git
synced 2025-12-14 20:36:38 +01:00
Revert "Revert "Prevent noncopyable metatypes from being converted to Any""
This reverts commit 1a3b42cd63.
This commit is contained in:
@@ -3834,8 +3834,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