File tree Expand file tree Collapse file tree 1 file changed +6
-3
lines changed
library/src/scala/runtime/stdLibPatches Expand file tree Collapse file tree 1 file changed +6
-3
lines changed Original file line number Diff line number Diff line change @@ -50,13 +50,16 @@ object Predef:
5050 extension [T ](x : T | Null ) inline def nn : x.type & T =
5151 scala.runtime.Scala3RunTime .nn(x)
5252
53- /** Enables an expression of type `T|Null`, where `T` is a subtype of `AnyRef`, to be checked for `null`
54- * using `eq` and `ne`, rather than only `==` and `!=`. This is needed because `Null` no longer has
55- * `eq` or `ne` methods, only `==` and `!=` inherited from `Any`. */
5653 extension (inline x : AnyRef | Null )
54+ /** Enables an expression of type `T|Null`, where `T` is a subtype of `AnyRef`, to be checked for `null`
55+ * using `eq` rather than only `==`. This is needed because `Null` no longer has
56+ * `eq` or `ne` methods, only `==` and `!=` inherited from `Any`. */
5757 @ experimental
5858 inline def eq (inline y : AnyRef | Null ): Boolean =
5959 x.asInstanceOf [AnyRef ] eq y.asInstanceOf [AnyRef ]
60+ /** Enables an expression of type `T|Null`, where `T` is a subtype of `AnyRef`, to be checked for `null`
61+ * using `ne` rather than only `!=`. This is needed because `Null` no longer has
62+ * `eq` or `ne` methods, only `==` and `!=` inherited from `Any`. */
6063 @ experimental
6164 inline def ne (inline y : AnyRef | Null ): Boolean =
6265 ! (x eq y)
You can’t perform that action at this time.
0 commit comments