-
Notifications
You must be signed in to change notification settings - Fork 4.2k
Open
Labels
Area-CompilersBugConcept-Diagnostic ClarityThe issues deals with the ease of understanding of errors and warnings.The issues deals with the ease of understanding of errors and warnings.
Milestone
Description
The following code
public static void M(object o)
{
var (x, y) = o;
}Gets four errors when only one is deserved
error CS1061: 'object' does not contain a definition for 'Deconstruct' and no extension method 'Deconstruct' accepting a first argument of type 'object' could be found (are you missing a using directive or an assembly reference?)
error CS8129: No suitable Deconstruct instance or extension method was found for type 'object', with 2 out parameters and a void return type.
error CS8130: Cannot infer the type of implicitly-typed deconstruction variable 'x'.
error CS8130: Cannot infer the type of implicitly-typed deconstruction variable 'y'.
Copilot
Metadata
Metadata
Assignees
Labels
Area-CompilersBugConcept-Diagnostic ClarityThe issues deals with the ease of understanding of errors and warnings.The issues deals with the ease of understanding of errors and warnings.