operator overloading for type-closed generic class #8754
Unanswered
aka-nse
asked this question in
Language Ideas
Replies: 1 comment
-
#164 should solve this and more. |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
Maybe related to #1315.
In C#, operator overloading is supported as syntax sugar of static method calling.
For example,
operator+
will be converted to the static methodop_Addition
.BTW, the following code is valid:
but the following code is not valid:
although the following code is valid:
Like this, type-closed generic static method is available but such a operator is prohibited now.
In this proposal I suggest to allow operator overloading for type-closed generics such as 2nd code.
Beta Was this translation helpful? Give feedback.
All reactions