mirror of
https://github.com/apple/swift.git
synced 2025-12-21 12:14:44 +01:00
Push the conformance accessor hack down into getTypeByMangledName.
This commit is contained in:
@@ -645,8 +645,9 @@ bool swift::_checkGenericRequirements(
|
||||
// Resolve the subject generic parameter.
|
||||
const Metadata *subjectType =
|
||||
swift_getTypeByMangledName(MetadataState::Abstract,
|
||||
req.getParam(), substGenericParam,
|
||||
substWitnessTable).getMetadata();
|
||||
req.getParam(),
|
||||
extraArguments.data(),
|
||||
substGenericParam, substWitnessTable).getMetadata();
|
||||
if (!subjectType)
|
||||
return true;
|
||||
|
||||
@@ -671,8 +672,9 @@ bool swift::_checkGenericRequirements(
|
||||
// Demangle the second type under the given substitutions.
|
||||
auto otherType =
|
||||
swift_getTypeByMangledName(MetadataState::Abstract,
|
||||
req.getMangledTypeName(), substGenericParam,
|
||||
substWitnessTable).getMetadata();
|
||||
req.getMangledTypeName(),
|
||||
extraArguments.data(),
|
||||
substGenericParam, substWitnessTable).getMetadata();
|
||||
if (!otherType) return true;
|
||||
|
||||
assert(!req.getFlags().hasExtraArgument());
|
||||
@@ -699,8 +701,9 @@ bool swift::_checkGenericRequirements(
|
||||
// Demangle the base type under the given substitutions.
|
||||
auto baseType =
|
||||
swift_getTypeByMangledName(MetadataState::Abstract,
|
||||
req.getMangledTypeName(), substGenericParam,
|
||||
substWitnessTable).getMetadata();
|
||||
req.getMangledTypeName(),
|
||||
extraArguments.data(),
|
||||
substGenericParam, substWitnessTable).getMetadata();
|
||||
if (!baseType) return true;
|
||||
|
||||
// Check whether it's dynamically castable, which works as a superclass
|
||||
|
||||
Reference in New Issue
Block a user