[RDG] Route handlers with the same parameters but differing nullability produce compiler warnings #46622
Labels
area-minimal
Includes minimal APIs, endpoint filters, parameter binding, request delegate generator etc
feature-rdg
Milestone
At the moment, it's hard to use our strongly-typed overloads strategy to generate code that correctly handles two route handlers with the same parameters but differing nullability:
We might consider generating two different strongly-typed overloads, one with the nullability annotations and one without:
But overload resolution is not able to discern between the two delegate signatures and treats them as ambiguous overloads.
We can also emit only the overload that expects an NRT:
But that presents a nullability warning to users (CS8622) when passing an overload to the delegate that does not expect an NRT.
The text was updated successfully, but these errors were encountered: