We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent f381c29 commit db460c9Copy full SHA for db460c9
lib/Sema/ConstraintSystem.cpp
@@ -276,10 +276,11 @@ void ConstraintSystem::addConversionRestriction(
276
Type srcType, Type dstType,
277
ConversionRestrictionKind restriction) {
278
auto key = std::make_pair(srcType.getPointer(), dstType.getPointer());
279
- bool inserted = ConstraintRestrictions.insert(
280
- std::make_pair(key, restriction)).second;
281
- if (!inserted)
+ auto pair = ConstraintRestrictions.insert({key, restriction});
+ if (!pair.second) {
+ ASSERT(pair.first->second == restriction);
282
return;
283
+ }
284
285
if (solverState) {
286
recordChange(SolverTrail::Change::AddedConversionRestriction(
0 commit comments