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 @@ -6124,7 +6124,7 @@ bool FailureDiagnosis::visitApplyExpr(ApplyExpr *callExpr) {
6124
6124
diag.highlight (rhsExpr->getSourceRange ());
6125
6125
if (auto optUnwrappedType = rhsType->getOptionalObjectType ()) {
6126
6126
if (lhsType->isEqual (optUnwrappedType)) {
6127
- diag.fixItInsert (lhsExpr->getEndLoc (), " ?" );
6127
+ diag.fixItInsertAfter (lhsExpr->getEndLoc (), " ?" );
6128
6128
}
6129
6129
}
6130
6130
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