You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Infix operations involving alphanumeric operators that do not carry @infix annotations are deprecated. Infix operations involving symbolic operators are always allowed, so `@infix` is redundant for methods with symbolic names. Infix operations are also allowed
82
-
if an alphanumeric operator name is given in backticks (as in the third call of `difference` above).
81
+
Infix operations involving alphanumeric operators are deprecated, unless
82
+
one of the following conditions holds:
83
+
84
+
- the operator definition carries an `@infix` annotation, or
85
+
- the operator was compiled with Scala 2, or
86
+
- the operator is followed by an opening brace.
87
+
88
+
An alphanumeric operator is an operator consisting entirely of letters, digits, the `$` and `_` characters, or
89
+
any unicode character `c` for which `java.lang.Character.isIdentifierPart(c)` returns `true`.
90
+
91
+
Infix operations involving symbolic operators are always allowed, so `@infix` is redundant for methods with symbolic names.
83
92
84
93
The @infix annotation can also be given to a type:
85
94
```
@@ -116,3 +125,5 @@ The purpose of the `@infix` annotation is to achieve consistency across a code b
116
125
117
126
can be applied using infix syntax, i.e. `A op B`.
118
127
128
+
5. To smooth migration to Scala3.0, alphanumeric operations will only be deprecated from Scala3.1 onwards,
129
+
or if the `-strict` option is giveninDotty/Scala3.
0 commit comments