File tree Expand file tree Collapse file tree 2 files changed +8
-1
lines changed Expand file tree Collapse file tree 2 files changed +8
-1
lines changed Original file line number Diff line number Diff line change @@ -6448,7 +6448,8 @@ static ConstraintFix *maybeWarnAboutExtraneousCast(
6448
6448
return nullptr ;
6449
6449
6450
6450
// Both types have to be fixed.
6451
- if (fromType->hasTypeVariable () || toType->hasTypeVariable ())
6451
+ if (fromType->hasTypeVariable () || toType->hasTypeVariable () ||
6452
+ fromType->hasPlaceholder () || toType->hasPlaceholder ())
6452
6453
return nullptr ;
6453
6454
6454
6455
SmallVector<LocatorPathElt, 4 > path;
Original file line number Diff line number Diff line change @@ -529,3 +529,9 @@ let _ = derived is (SR13899_Derived) -> Void // expected-warning{{'is' test is a
529
529
let _ = derived is ( SR13899_Derived ) throws -> Void // expected-warning{{'is' test is always true}}
530
530
let _ = blockp is ( SR13899_A ) -> Void //expected-warning{{'is' test is always true}}
531
531
let _ = blockp is ( SR13899_A ) throws -> Void //expected-warning{{'is' test is always true}}
532
+
533
+ protocol PP1 { }
534
+ protocol PP2 : PP1 { }
535
+ extension Optional : PP1 where Wrapped == PP2 { }
536
+
537
+ nil is PP1 // expected-error {{'nil' requires a contextual type}}
You can’t perform that action at this time.
0 commit comments