The following local variable declaration generates a WTG1002 diagnostic, but shouldn't
Dictionary<string, string> foo = new();
new() is only able to identify the correct type because the variable was given an explicit type. If I change it to var then it (understandably) generates a CS8754 error.
The following local variable declaration generates a WTG1002 diagnostic, but shouldn't
new()
is only able to identify the correct type because the variable was given an explicit type. If I change it to var then it (understandably) generates a CS8754 error.