-
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
Allow parameter renames in Edit and Continue #54856
Conversation
00771cc
to
95b2551
Compare
27c9822
to
5705a3b
Compare
fb75822
to
93aa07c
Compare
@tmat PTAL Now that the other PR is in, this is pretty straight forward |
src/Compilers/CSharp/Test/Emit/Emit/EditAndContinue/EditAndContinueTests.cs
Outdated
Show resolved
Hide resolved
src/Compilers/CSharp/Test/Emit/Emit/EditAndContinue/EditAndContinueTests.cs
Outdated
Show resolved
Hide resolved
src/Compilers/CSharp/Test/Emit/Emit/EditAndContinue/EditAndContinueTests.cs
Outdated
Show resolved
Hide resolved
src/Compilers/CSharp/Test/Emit/Emit/EditAndContinue/EditAndContinueTests.cs
Outdated
Show resolved
Hide resolved
src/EditorFeatures/CSharpTest/EditAndContinue/StatementEditingTests.cs
Outdated
Show resolved
Hide resolved
src/Features/Core/Portable/EditAndContinue/AbstractEditAndContinueAnalyzer.cs
Outdated
Show resolved
Hide resolved
src/Features/Core/Portable/EditAndContinue/AbstractEditAndContinueAnalyzer.cs
Outdated
Show resolved
Hide resolved
src/EditorFeatures/VisualBasicTest/EditAndContinue/TopLevelEditingTests.vb
Outdated
Show resolved
Hide resolved
src/Features/Core/Portable/EditAndContinue/AbstractEditAndContinueAnalyzer.cs
Show resolved
Hide resolved
src/Features/Core/Portable/EditAndContinue/AbstractEditAndContinueAnalyzer.cs
Outdated
Show resolved
Hide resolved
src/Features/Core/Portable/EditAndContinue/AbstractEditAndContinueAnalyzer.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.
🕐
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.
Compiler changes LGTM.
Hard to get type information otherwise 🤦♂️
Worked out my symbol issues, the tests were bad and I feel bad. Updated with all feedback addressed now. |
@@ -1404,6 +1495,10 @@ class C | |||
EncValidation.VerifyModuleMvid(2, reader1, reader2); | |||
|
|||
CheckNames(readers, reader2.GetTypeDefNames()); | |||
CheckNames(readers, reader2.GetMethodDefNames(), "F"); | |||
CheckNames(readers, reader2.GetParameterDefNames(), "", "arg"); |
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.
The method return
src/Compilers/VisualBasic/Test/Emit/Emit/EditAndContinue/EditAndContinueTests.vb
Outdated
Show resolved
Hide resolved
src/EditorFeatures/CSharpTest/EditAndContinue/StatementMatchingTests.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.
Ping @dotnet/roslyn-compiler for a second review |
@RikkiGibson PTAL |
@@ -5260,7 +5286,7 @@ private static bool TryMapParameter((SyntaxNode? Node, int Ordinal) parameterKey | |||
var newLambdaSymbol = GetLambdaExpressionSymbol(newModel, newLambda, cancellationToken); | |||
|
|||
// signature validation: | |||
if (!ParametersEquivalent(oldLambdaSymbol.Parameters, newLambdaSymbol.Parameters, exact: false)) | |||
if (!ParameterTypesEquivalent(oldLambdaSymbol.Parameters, newLambdaSymbol.Parameters, exact: false)) |
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.
I was confused by this method name. Don't we also consider a change to the parameter's ref kind a rude edit? Do we have existing tests for such scenarios?
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.
RefKind is part of parameter type.
Fixes #52563
Fixes #48635