mirror of
https://github.com/apple/swift.git
synced 2025-12-21 12:14:44 +01:00
Sema: Generic parameters can only bind to materializable types
I don't have a test case for this, so it might be a no-op. But it's clearly "correct".
This commit is contained in:
@@ -373,7 +373,9 @@ namespace {
|
||||
cast<GenericTypeParamType>(genericParam->getCanonicalType()));
|
||||
|
||||
if (known == replacements.end())
|
||||
return cs.createTypeVariable(nullptr, TVO_PrefersSubtypeBinding);
|
||||
return cs.createTypeVariable(nullptr,
|
||||
TVO_PrefersSubtypeBinding |
|
||||
TVO_MustBeMaterializable);
|
||||
|
||||
return known->second;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user