-
Notifications
You must be signed in to change notification settings - Fork 4.2k
Closed
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
Example:
using System;
public class Program
{
public void T()
{
var value = (ConsoleColor)-1;
}
}We get two error messages:
Example.cs(7,22): error CS0119: 'ConsoleColor' is a type, which is not valid in the given context
Example.cs(7,21): error CS0075: To cast a negative value, you must enclose the value in parentheses.
Can we get rid of the first error if the second is present? It's fairly obvious what we're trying to do and I often get this error as I forgot to add the parens
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.