File tree Expand file tree Collapse file tree 1 file changed +0
-19
lines changed Expand file tree Collapse file tree 1 file changed +0
-19
lines changed Original file line number Diff line number Diff line change @@ -291,7 +291,6 @@ class FailureDiagnosis :public ASTVisitor<FailureDiagnosis, /*exprresult*/bool>{
291
291
bool visitDictionaryExpr (DictionaryExpr *E);
292
292
bool visitObjectLiteralExpr (ObjectLiteralExpr *E);
293
293
294
- bool visitForceValueExpr (ForceValueExpr *FVE);
295
294
bool visitBindOptionalExpr (BindOptionalExpr *BOE);
296
295
297
296
bool visitSubscriptExpr (SubscriptExpr *SE);
@@ -3321,24 +3320,6 @@ bool FailureDiagnosis::visitCoerceExpr(CoerceExpr *CE) {
3321
3320
return false ;
3322
3321
}
3323
3322
3324
- bool FailureDiagnosis::visitForceValueExpr (ForceValueExpr *FVE) {
3325
- auto argExpr = typeCheckChildIndependently (FVE->getSubExpr ());
3326
- if (!argExpr) return true ;
3327
- auto argType = CS.getType (argExpr);
3328
-
3329
- // If the subexpression type checks as a non-optional type, then that is the
3330
- // error. Produce a specific diagnostic about this.
3331
- if (!isUnresolvedOrTypeVarType (argType) &&
3332
- argType->getOptionalObjectType ().isNull ()) {
3333
- diagnose (FVE->getLoc (), diag::invalid_force_unwrap, argType)
3334
- .fixItRemove (FVE->getExclaimLoc ())
3335
- .highlight (FVE->getSourceRange ());
3336
- return true ;
3337
- }
3338
-
3339
- return false ;
3340
- }
3341
-
3342
3323
bool FailureDiagnosis::visitBindOptionalExpr (BindOptionalExpr *BOE) {
3343
3324
auto argExpr = typeCheckChildIndependently (BOE->getSubExpr ());
3344
3325
if (!argExpr) return true ;
You can’t perform that action at this time.
0 commit comments