-
Notifications
You must be signed in to change notification settings - Fork 4.7k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Lack of CS0165 (Use of unassigned local variable) for DateOnly and TimeOnly types #77177
Comments
I couldn't figure out the best area label to add to this issue. If you have write-permissions please help me learn by adding exactly one area label. |
Tagging subscribers to this area: @dotnet/area-infrastructure-libraries Issue DetailsVersion Used: Steps to Reproduce: DateOnly date;
TimeOnly time;
Console.WriteLine(date);//Lack of CS0165 - unassigned local variable
Console.WriteLine(time);//Same here Expected Behavior: Actual Behavior:
|
Tagging subscribers to this area: @dotnet/area-system-runtime Issue DetailsVersion Used: Steps to Reproduce: DateOnly date;
TimeOnly time;
Console.WriteLine(date);//Lack of CS0165 - unassigned local variable
Console.WriteLine(time);//Same here Expected Behavior: Actual Behavior:
|
Changing label to |
cc @tarekgh as this is DateTime related |
This is fixed in .NET |
Version Used:
.Net 6. Visual Studio 17.3.6.
Steps to Reproduce:
Expected Behavior:
You should have CS0165 error (Use of unassigned local variable).
If you change a type to e.g. DateTime, the error appears like it should.
Actual Behavior:
No error, you can compile and run it.
The text was updated successfully, but these errors were encountered: