Skip to content

Commit f145264

Browse files
[tests] Fix parser recover tests
1 parent a1bf54a commit f145264

File tree

2 files changed

+4
-5
lines changed

2 files changed

+4
-5
lines changed

lib/Sema/CSSimplify.cpp

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2824,11 +2824,10 @@ bool ConstraintSystem::repairFailures(
28242824
return true;
28252825
}
28262826

2827-
// If it has a deep equality restriction defer the diagnostic to a
2828-
// GenericMismatch fix.
2829-
if (hasConversionOrRestriction(ConversionRestrictionKind::DeepEquality)) {
2827+
// If it has a deep equality restriction, defer the diagnostic to
2828+
// GenericMismatch.
2829+
if (hasConversionOrRestriction(ConversionRestrictionKind::DeepEquality))
28302830
return false;
2831-
}
28322831

28332832
auto *fix = ContextualMismatch::create(*this, lhs, rhs,
28342833
getConstraintLocator(locator));

test/Parse/recovery.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -621,7 +621,7 @@ class WrongInheritanceClause7<T>(Int where T:AnyObject {}
621621
// <rdar://problem/18502220> [swift-crashes 078] parser crash on invalid cast in sequence expr
622622
Base=1 as Base=1 // expected-error{{cannot convert value of type 'Int' to type 'Base' in coercion}}
623623
// expected-error@-1 {{cannot assign to immutable expression of type 'Base.Type'}}
624-
// expected-error@-2 {{left side of mutating operator has immutable type 'Base'}}
624+
// expected-error@-2 {{cannot assign to immutable expression of type 'Base'}}
625625
// expected-error@-3 {{cannot assign value of type '()' to type 'Base.Type'}}
626626
// expected-error@-4 {{cannot assign value of type 'Int' to type 'Base'}}
627627

0 commit comments

Comments
 (0)