Skip to content

Conversation

@akyrtzi
Copy link
Contributor

@akyrtzi akyrtzi commented Dec 3, 2019

Also add test to ensure the casting to SyntaxEnum via optional chaining works as expected.

@akyrtzi akyrtzi requested a review from ahoppen December 3, 2019 23:09
@akyrtzi
Copy link
Contributor Author

akyrtzi commented Dec 3, 2019

@swift-ci Please test

Copy link
Member

@ahoppen ahoppen left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looking good. Thanks!

@swift-ci
Copy link
Contributor

swift-ci commented Dec 4, 2019

Build failed
Swift Test OS X Platform
Git Sha - ebb1a0c

…arameter

Also add test to ensure the casting to `SyntaxEnum` via optional chaining works as expected.
@akyrtzi akyrtzi changed the title [Syntax] Provide a generic casting function that can cast any protocol type [Syntax] Provide a Syntax constructor that can accept an optional parameter Dec 4, 2019
@akyrtzi
Copy link
Contributor Author

akyrtzi commented Dec 4, 2019

The generic cast function has a serious flaw in that it is preferred over a specific cast function that returns non-optional, when optional chaining. I've reverted to original casts and kept only the Syntax constructor that accepts an optional parameter.

@akyrtzi
Copy link
Contributor Author

akyrtzi commented Dec 4, 2019

@swift-ci Please test

@swiftlang swiftlang deleted a comment from swift-ci Dec 4, 2019
@akyrtzi akyrtzi merged commit 064e502 into swiftlang:master Dec 4, 2019
@akyrtzi akyrtzi deleted the cast-client-types branch December 4, 2019 19:49
adevress pushed a commit to adevress/swift-syntax that referenced this pull request Jan 14, 2024
Rearrange breaks so class decls won't overflow line length.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants