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-4148] Indexed access to a complex type representation #46731

Closed
nkcsgexi opened this issue Mar 3, 2017 · 1 comment
Closed

[SR-4148] Indexed access to a complex type representation #46731

nkcsgexi opened this issue Mar 3, 2017 · 1 comment
Assignees
Labels
compiler The Swift compiler in itself feature A feature request or implementation † libswiftSyntax † Area → compiler: the once-integrated C++ Syntax library succeeded by SwiftSyntax stale Resolution: No longer relevant, stale types Feature: types

Comments

@nkcsgexi
Copy link
Member

nkcsgexi commented Mar 3, 2017

Previous ID SR-4148
Radar None
Original Reporter @nkcsgexi
Type New Feature
Additional Detail from JIRA
Votes 0
Component/s Compiler
Labels New Feature, Syntax
Assignee @bitjammer
Priority Medium

md5: 5332377ec4d12158f94cc129bc84d56d

Issue Description:

For syntax nodes for type repr, we should have a generic way to navigate the complexity of type repr. For instance, from a complex type repr like (C1, (C2, C3?))->C4, we can get the C3 by a given index chain of 0:1:1:0.

API example:

Optional<TypeReprSyntax> getSubTypeRepr(ArrayRef<unsigned> Indices, UnfoundReason &Reason) {  
....  
}

This feature will allow us to bridge syntax tree with swift-api-digester because the later always dumps type change info in a mechanical way, for instance:

TYPE_CHANGE(REMOVE_OPTIONALITY, "objc@someUSRofAFunction", "1"/**second parameter**/, "0:1:1"/**type indices**/) // from api-digester

This tells us the second parameter of the given function should change from
(C1, (C2, C3?))->C4 to
(C1, (C2, C3))->C4.

@swift-ci swift-ci transferred this issue from apple/swift-issues Apr 25, 2022
@AnthonyLatsis AnthonyLatsis added feature A feature request or implementation types Feature: types stale Resolution: No longer relevant, stale and removed new feature labels Apr 5, 2023
@AnthonyLatsis
Copy link
Collaborator

libSyntax was removed in #62145 and succeeded by swift-syntax.

@AnthonyLatsis AnthonyLatsis closed this as not planned Won't fix, can't repro, duplicate, stale Apr 5, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
compiler The Swift compiler in itself feature A feature request or implementation † libswiftSyntax † Area → compiler: the once-integrated C++ Syntax library succeeded by SwiftSyntax stale Resolution: No longer relevant, stale types Feature: types
Projects
None yet
Development

No branches or pull requests

2 participants