Skip to content
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

[SR-9710] Return trailing comma value when access to FunctionParameterSyntax.ellipsis. #436

swift-ci opened this issue Jan 20, 2019 · 1 comment


Copy link

@swift-ci swift-ci commented Jan 20, 2019

Previous ID SR-9710
Radar rdar://problem/43690589
Original Reporter bannzai (JIRA User)
Type Bug
Status Resolved
Resolution Done
SwiftSyntax Xcode swiftc
swift-4.2-RELEASE 0.40200.0 Version 10.1 (10B61) Apple Swift version 4.2.1 (swiftlang-1000.11.42 clang-1000.11.45.1)
Additional Detail from JIRA
Votes 1
Component/s SwiftSyntax
Labels Bug
Assignee bannzai (JIRA)
Priority Medium

md5: 6edd4f723170e810db835d1b3fdd1401

Issue Description:

When FunctionParameterSyntax.ellipsis property access, It returned wrong token about `tokenKind.kind == "comma"`.
You can check problem with after exec SwiftSyntax-issue-ellipsis.
And It can check result SwiftSyntax-issue-ellipsis repository's README.



ccc: Int, 
no trailing comma
Program ended with exit code: 0

So, I access `ellipsis`(...), But I got `comma`(,) token.

And I confirmed more case for $ swiftc -emit-syntax swift-syntax-source.swift result json.
It estimates in the specifity range in gist.

I guess that expected order of layout.

Cursor value
Attributes null
FirstName argument1
SecondName null
Colon :
Type Int
Ellipsis null
DefaultArgument null
TrailingComma ,

But I got

Cursor value
Attributes null
FirstName argument1
SecondName null
Colon :
Type Int
Ellipsis ,
DefaultArgument null
TrailingComma null

So, `Elilpsis=,` and `TrailingComma=null` are wrong result.

Copy link
Contributor Author

@swift-ci swift-ci commented Feb 12, 2019

Comment by yudai.hirose (JIRA)

Resolved: apple/swift#22214

@swift-ci swift-ci transferred this issue from apple/swift-issues Apr 25, 2022
@shahmishal shahmishal transferred this issue from apple/swift May 9, 2022
This issue was closed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
None yet

No branches or pull requests

1 participant