mirror of
https://github.com/apple/swift.git
synced 2025-12-14 20:36:38 +01:00
[Deserialization] Weakened DeclContext asssertion in maybeReadGenericParams.
An over-eager assertion in ModuleFile::maybeReadGenericParams() rejected deserialization into the context of a generic subscript for a generic parameter within one of its accessors. Weaken the assertion; the DeclContext of the generic parameter will be overwritten with the correct context later. Fixes rdar://problem/37408205.
This commit is contained in:
@@ -738,7 +738,8 @@ GenericParamList *ModuleFile::maybeReadGenericParams(DeclContext *DC,
|
||||
// precede SIL linkage, we should be ok.
|
||||
assert((genericParam->getDeclContext()->isModuleScopeContext() ||
|
||||
DC->isModuleScopeContext() ||
|
||||
genericParam->getDeclContext() == DC) &&
|
||||
genericParam->getDeclContext() == DC ||
|
||||
genericParam->getDeclContext()->isChildContextOf(DC)) &&
|
||||
"Mismatched decl context for generic types.");
|
||||
params.push_back(genericParam);
|
||||
break;
|
||||
|
||||
Reference in New Issue
Block a user