-
Notifications
You must be signed in to change notification settings - Fork 4.1k
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] Allow deleting method #61806
[EnC] Allow deleting method #61806
Conversation
fe3ee19
to
253bae5
Compare
} | ||
""", | ||
edits: new[] { | ||
Edit(SemanticEditKind.Insert, symbolProvider: c => c.GetMember("C.M1")), |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes, but only during emit. So the analyzer still sees it as an insert and still reports the semantic edit as such, which is what this represents, but then in DeltaMetadataWriter (here) that gets treated as an update.
src/EditorFeatures/TestUtilities/EditAndContinue/EditAndContinueTestHelpers.cs
Outdated
Show resolved
Hide resolved
@dotnet/roslyn-compiler for a second review, please |
Ping @tmat |
src/EditorFeatures/CSharpTest/EditAndContinue/TopLevelEditingTests.cs
Outdated
Show resolved
Hide resolved
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Just a few minor things. |
Nice! |
Fixes #61678
Part of #59264
This allows deleting a method in Edit and Continue/Hot Reload. When deleted, we emit a method that throws
MissingMethodException
in its place. If a method by the same is name is re-added, we emit an update, as though the method wasn't deleted in the first place.