Need LDM decisions for overload resolution in the face of 'out var' #13845
Labels
Area-Compilers
Area-Language Design
Bug
Language-C#
New Language Feature - Out Variable Declaration
Out Variable Declaration
Milestone
We need the LDM to decide how 'out var' should interact with overload resolution. Currently, the presence of an out var argument prevents that parameter position from contributing to betterness. For example, the following program is ambiguous in the current prototype.
I would recommend saying that there is an implicit "conversion from expression" from the 'out var' to any (
out
) argument type. Then, the usual tie-breakers will cause the first of these methods to be selected.The text was updated successfully, but these errors were encountered: