Skip to content

Commit a7a826a

Browse files
committed
Removes dynamicType diagnostic. Fixes SR-14667
1 parent 9fbf359 commit a7a826a

File tree

1 file changed

+0
-12
lines changed

1 file changed

+0
-12
lines changed

lib/Parse/ParseExpr.cpp

Lines changed: 0 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1154,18 +1154,6 @@ Parser::parseExprPostfixSuffix(ParserResult<Expr> Result, bool isExprBasic,
11541154
continue;
11551155
}
11561156

1157-
// Handle the deprecated 'x.dynamicType' and migrate it to `type(of: x)`
1158-
if (Tok.getText() == "dynamicType") {
1159-
auto range = Result.get()->getSourceRange();
1160-
auto dynamicTypeExprRange = SourceRange(TokLoc, Tok.getLoc());
1161-
diagnose(TokLoc, diag::expr_dynamictype_deprecated)
1162-
.highlight(dynamicTypeExprRange)
1163-
.fixItReplace(dynamicTypeExprRange, ")")
1164-
.fixItInsert(range.Start, "type(of: ");
1165-
1166-
// fallthrough to an UnresolvedDotExpr.
1167-
}
1168-
11691157
// Handle "x.<tab>" for code completion.
11701158
if (Tok.is(tok::code_complete)) {
11711159
assert(!InSwiftKeyPath);

0 commit comments

Comments
 (0)