Skip to content

[Variadic Generics] diagnostics + fixits for parameter pack syntax change: T... -> each T #1393

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Conversation

sophiapoirier
Copy link
Contributor

brings parity with swiftlang/swift#64104 in the C++ implementation

@sophiapoirier sophiapoirier requested a review from ahoppen as a code owner March 8, 2023 23:13
@sophiapoirier sophiapoirier force-pushed the type-parameter-pack-syntax-each-diagnostics branch 3 times, most recently from 04d361a to a344469 Compare March 10, 2023 00:55
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.

One minor comment, otherwise LGTM. Also thanks for fixing the comment I added in the other PR.

message: { _ in .typeParameterPackEllipsis }
)
} else if let unexpected = node.unexpectedBetweenNameAndColon,
let unexpectedEllipsis = unexpected.onlyToken(where: { $0.tokenKind == .ellipsis }) {
Copy link
Member

Choose a reason for hiding this comment

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

Instead of force unwrapping below, I would add let each = node.each to the condition.

@sophiapoirier sophiapoirier force-pushed the type-parameter-pack-syntax-each-diagnostics branch from c62591a to 5cb534b Compare March 10, 2023 02:59
@sophiapoirier
Copy link
Contributor Author

@swift-ci please test

@sophiapoirier sophiapoirier merged commit 17d5043 into swiftlang:main Mar 10, 2023
@sophiapoirier sophiapoirier deleted the type-parameter-pack-syntax-each-diagnostics branch March 10, 2023 15:36
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.

2 participants