dotnet / roslyn

The Roslyn .NET compiler provides C# and Visual Basic languages with rich code analysis APIs.
https://docs.microsoft.com/dotnet/csharp/roslyn-sdk/
MIT License
19.04k stars 4.03k forks source link

Test plan for CheckedUserDefinedOperators feature #59458

Closed AlekseyTs closed 1 year ago

AlekseyTs commented 2 years ago

Feature branch - https://github.com/dotnet/roslyn/tree/features/CheckedUserDefinedOperators Specification - https://github.com/dotnet/csharplang/blob/main/proposals/csharp-11.0/checked-user-defined-operators.md Proposal: https://github.com/dotnet/csharplang/issues/4665

Compiler

Compiler Public APIs

Syntax

Semantics

Productivity

Docs

333fred commented 2 years ago

I've added more to the test plan. I'll go through and check things off on Monday.

Rekkonnect commented 2 years ago

Just tried the feature out, and I think it would be nice to have a more specific error when a user types:

public static int operator unchecked +(int left, int right);
//                         ~~~~~~~~~

Saying that unchecked operators do not require the modifier. Currently, multiple unrelated errors are being shown: image

AlekseyTs commented 2 years ago

@AlFasGD This issue is not meant for tracking and discussing different aspects of the feature. If you would like to report a bug or suggestion, please, open a dedicated issue.