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

ChangeSignature: should trigger in positional records #44558

Closed
jcouv opened this issue May 26, 2020 · 7 comments · Fixed by #53052
Closed

ChangeSignature: should trigger in positional records #44558

jcouv opened this issue May 26, 2020 · 7 comments · Fixed by #53052
Assignees
Labels
Area-IDE Concept-Design Debt Engineering Debt, Design Debt, or poor product code quality help wanted The issue is "up for grabs" - add a comment if you are interested in working on it New Language Feature - Records Records
Milestone

Comments

@jcouv
Copy link
Member

jcouv commented May 26, 2020

ChangeSignature is currently not offered.
Note: we first need to clarify whether those are parameter or property declarations (tracked by #44556).

image

Note that we offer ChangeSignature on other constructor parameters:
image

Relates to #40726 (test plan for "records")

@jinujoseph jinujoseph added the Concept-Design Debt Engineering Debt, Design Debt, or poor product code quality label May 27, 2020
@jinujoseph
Copy link
Contributor

cc @dpoeschl

@jinujoseph jinujoseph added this to the 16.7 milestone May 27, 2020
@jinujoseph jinujoseph modified the milestones: 16.7, Backlog Jun 19, 2020
@jcouv jcouv modified the milestones: Backlog, 16.8 Sep 2, 2020
@jcouv
Copy link
Member Author

jcouv commented Sep 2, 2020

From discussion with @CyrusNajmabadi, let's take a stab for 16.8, otherwise push to 16.9.

@jcouv jcouv added the help wanted The issue is "up for grabs" - add a comment if you are interested in working on it label Sep 2, 2020
@jcouv
Copy link
Member Author

jcouv commented Sep 2, 2020

Assigned to @allisonchou since the duplicate issue had been assigned to her.
This may require new semantic model APIs to be able to update the base list (change signature on Base should update record Derived(int i) : Base(...);. Using GetSymbolInfo on the base type syntax correctly returns the constructor symbol.
We should verify that callers are updated (new Person(....)), but we expect that to just work.

@allisonchou allisonchou modified the milestones: 16.8, 16.9 Sep 24, 2020
@allisonchou
Copy link
Contributor

@jcouv For record declarations, is there a way to get their associated IParameterSymbols if they have any?

For example, with following code -

record Rec(string One, string Two)
{
}

Rec is an INamedTypeSymbol. However, I haven't been able to find a straightforward way to get parameter symbols from an INamedTypeSymbol, which we need for change signature.

@jcouv
Copy link
Member Author

jcouv commented Dec 9, 2020

@allisonchou Tagging @CyrusNajmabadi who is working on symbol for associating parameters and properties in records.

@jinujoseph jinujoseph modified the milestones: 16.9, 16.10 Feb 1, 2021
@jinujoseph jinujoseph modified the milestones: 16.10, 17.0 Apr 27, 2021
@Youssef1313
Copy link
Member

I'm working on this issue as part of a quick pass for IDE features that need to handle record doc comments.

@jcouv
Copy link
Member Author

jcouv commented May 1, 2021

@allisonchou GetDeclaredSymbol on the parameter syntax will give you the corresponding parameter symbol.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Area-IDE Concept-Design Debt Engineering Debt, Design Debt, or poor product code quality help wanted The issue is "up for grabs" - add a comment if you are interested in working on it New Language Feature - Records Records
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants