dotnet / dotnet/dotnet-api-docs
Checked operator definitions don't use `operator` syntax
- Dominant language
- C#
- Stars
- 949
- Forks
- 1.7k
- Avg merge
- 3d 27m
- Merged PRs (30d)
- 49
Description
As the title says, checked operator method definitions don't use the `operator` syntax. Instead they use the CLR function names of `op_CheckedABC`. For example, [`Int128.op_CheckedIncrement` shows the definition as just that](https://docs.microsoft.com/en-us/dotnet/api/system.int128.op_checkedincrement?view=net-7.0):
```cs
public static Int128 op_CheckedIncrement (Int128 value);
```

They should be using the new ["checked operator"](https://github.com/dotnet/csharplang/blob/main/proposals/checked-user-defined-operators.md) syntax. For `Int128.op_CheckedIncrement`, this would result in the following function definition:
```cs
public static Int128 operator checked ++ (Int128 value);
```
Contributor guide
Assessment
This issue has not been assessed yet.