[SE-0096] [Parse] Implement type(of:) expression#3871
Closed
rxwei wants to merge 1 commit intoswiftlang:masterfrom
rxwei:master
Closed
[SE-0096] [Parse] Implement type(of:) expression#3871rxwei wants to merge 1 commit intoswiftlang:masterfrom rxwei:master
type(of:) expression#3871rxwei wants to merge 1 commit intoswiftlang:masterfrom
rxwei:master
Conversation
| // Parse `of` label | ||
| // If we see a potential argument label followed by a ':', consume | ||
| // it. | ||
| if (Tok.canBeArgumentLabel() && Tok.getText() == "of" && peekToken().is(tok::colon)) { |
Contributor
|
I have a patch for the test suite that I can submit once this is merged. |
Contributor
|
The insides of class DynamicTypeExpr : public Expr {
SourceLoc KeywordLoc;
SourceLoc LParenLoc;
Expr *Base;
SourceLoc RParenLoc;
/**/
} |
| } | ||
|
|
||
| // Handle "x.dynamicType" - A metatype expr. | ||
| // Deprecated in SE-0096: `x.dynamicType` becomes `type(of: x)` |
Contributor
There was a problem hiding this comment.
Can you add FIXME(SE-0096) here so we know to come around and remove this.
Contributor
|
In the interest of getting this patch in quickly, I'm going to rebase on top of this and submit my own and update all the corelibs along with it. Thank you for this patch and your efforts getting it into the repo! |
Contributor
Author
|
Ok thanks! |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What's in this pull request?
This is the implementation of SE-0096
type(of:)expression, including a warning for the deprecatedx.dynamicTypeexpression.Resolved bug number: (SR-)
Before merging this pull request to apple/swift repository:
Triggering Swift CI
The swift-ci is triggered by writing a comment on this PR addressed to the GitHub user @swift-ci. Different tests will run depending on the specific comment that you use. The currently available comments are:
Smoke Testing
A smoke test on macOS does the following:
device standard libraries are not built.
version of these tests are not run.
A smoke test on Linux does the following:
tests are not run.
Validation Testing
Lint Testing
Note: Only members of the Apple organization can trigger swift-ci.