-
Notifications
You must be signed in to change notification settings - Fork 10.4k
[RDG] Account of parameter name in signature comparison #50064
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
Conversation
@@ -162,7 +162,7 @@ namespace Microsoft.AspNetCore.Http.Generated | |||
createRequestDelegate); | |||
} | |||
|
|||
[InterceptsLocation(@"TestMapActions.cs", 27, 5)] | |||
[InterceptsLocation(@"TestMapActions.cs", 26, 5)] |
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.
This changed because we removed the #pragma disable
line preceding this invocation.
@@ -172,6 +168,346 @@ namespace Microsoft.AspNetCore.Http.Generated | |||
createRequestDelegate); | |||
} | |||
|
|||
[InterceptsLocation(@"TestMapActions.cs", 26, 5)] | |||
internal static RouteHandlerBuilder MapGet1( |
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.
Each of these handlers has the same signature but different parameter sources and names and now generates different interceptor methods.
@@ -122,9 +122,7 @@ public async Task MapAction_ExplicitBodyParam_ComplexReturn_Snapshot() | |||
}; | |||
var source = $""" | |||
app.MapPost("/fromBodyRequired", ([FromBody] Todo todo) => TypedResults.Ok(todo)); | |||
#pragma warning disable CS8622 |
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.
Interceptors fixed generating overloads for methods with the same signature but differing nullability so we no longer have a warning to suppress.
src/Http/Http.Extensions/test/RequestDelegateGenerator/CompileTimeCreationTests.cs
Outdated
Show resolved
Hide resolved
…TimeCreationTests.cs Co-authored-by: Brennan <[email protected]>
Closes #50048.