File tree Expand file tree Collapse file tree 3 files changed +3
-3
lines changed Expand file tree Collapse file tree 3 files changed +3
-3
lines changed Original file line number Diff line number Diff line change @@ -6240,7 +6240,7 @@ bool FailureDiagnosis::visitApplyExpr(ApplyExpr *callExpr) {
6240
6240
diag.highlight (rhsExpr->getSourceRange ());
6241
6241
if (auto optUnwrappedType = rhsType->getOptionalObjectType ()) {
6242
6242
if (lhsType->isEqual (optUnwrappedType)) {
6243
- diag.fixItInsert (lhsExpr->getEndLoc (), " ?" );
6243
+ diag.fixItInsertAfter (lhsExpr->getEndLoc (), " ?" );
6244
6244
}
6245
6245
}
6246
6246
return true ;
Original file line number Diff line number Diff line change @@ -165,7 +165,7 @@ default: break
165
165
166
166
// <rdar://problem/21995744> QoI: Binary operator '~=' cannot be applied to operands of type 'String' and 'String?'
167
167
switch ( " foo " as String ? ) {
168
- case " what " : break // expected-error{{expression pattern of type 'String' cannot match values of type 'String?'}}
168
+ case " what " : break // expected-error{{expression pattern of type 'String' cannot match values of type 'String?'}} {{12-12=?}}
169
169
default : break
170
170
}
171
171
Original file line number Diff line number Diff line change @@ -134,7 +134,7 @@ default:
134
134
}
135
135
136
136
switch optionalSel {
137
- case #selector( SR1827 . bar) : // expected-error{{expression pattern of type 'Selector' cannot match values of type 'Selector?'}} {{26-26 =?}}
137
+ case #selector( SR1827 . bar) : // expected-error{{expression pattern of type 'Selector' cannot match values of type 'Selector?'}} {{27-27 =?}}
138
138
break
139
139
case #selector( SR1827 . bar) !: // expected-error{{cannot force unwrap value of non-optional type 'Selector'}}
140
140
break
You can’t perform that action at this time.
0 commit comments