Skip to content

Commit a3c4882

Browse files
committed
Sema: Temporary workaround for recently-introduced GSB bug
1 parent e963526 commit a3c4882

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

lib/Sema/TypeCheckProtocol.cpp

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1207,6 +1207,13 @@ RequirementEnvironment::RequirementEnvironment(
12071207
// Next, add each of the requirements (mapped from the requirement's
12081208
// interface types into the abstract type parameters).
12091209
for (auto &req : reqSig->getRequirements()) {
1210+
// FIXME: This should not be necessary, since the constraint is redundant,
1211+
// but we need it to work around some crashes for now.
1212+
if (req.getKind() == RequirementKind::Conformance &&
1213+
req.getFirstType()->isEqual(selfType) &&
1214+
req.getSecondType()->isEqual(proto->getDeclaredType()))
1215+
continue;
1216+
12101217
builder.addRequirement(req, source, /*inferModule=*/nullptr,
12111218
&reqToSyntheticEnvMap);
12121219
}

0 commit comments

Comments
 (0)