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

EnC: member moves across partial definitions might be classified as renamed and not handled correctly #51011

Closed
tmat opened this issue Feb 4, 2021 · 1 comment · Fixed by #62364

Comments

@tmat
Copy link
Member

tmat commented Feb 4, 2021

Version Used:
Version 16.9.0 Preview 4.0 [30920.304.main]

Steps to Reproduce:

Before edit

File 1:

partial class C
{
   void F1() {}
}

File 2:

partial class C
{
   void F2() {}
}

After edit:

File 1:

partial class C
{
   void F2() {}
}

File 2:

partial class C
{
   void F1() {}
}

See test NestedPartialTypeInPartialType_RenameInsertDeleteAndInsertVirtual

Expected Behavior:

Each document has semantic update of F1 and F2, respectively.

Actual Behavior:

"Can't rename" rude edit is reported.

@tmat tmat added this to the Backlog milestone Feb 4, 2021
@dotnet-issue-labeler dotnet-issue-labeler bot added Area-Interactive untriaged Issues and PRs which have not yet been triaged by a lead labels Feb 4, 2021
@jinujoseph jinujoseph added Bug and removed untriaged Issues and PRs which have not yet been triaged by a lead labels Feb 10, 2021
@tmat
Copy link
Member Author

tmat commented Feb 22, 2021

Another scenario:

Before edit

File 1:

partial class C
{
   void F1() {}
}

File 2:

partial class C
{
   void F2() {}
}

After edit:

File 1:

partial class C
{
   void F1() {} // moved from file 2
   void F2() {}
}

File 2:

partial class C
{
   void F3() {} // added new method
}

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants