Skip to content

Commit 4c5c3ff

Browse files
smarterodersky
andauthored
Update docs/docs/reference/contextual/conversions.md
Co-Authored-By: odersky <[email protected]>
1 parent 5625ca8 commit 4c5c3ff

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

docs/docs/reference/contextual/conversions.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ primitive number types to subclasses of `java.lang.Number`. For instance, the
3838
conversion from `Int` to `java.lang.Integer` can be defined as follows:
3939
```scala
4040
implied int2Integer for Conversion[Int, java.lang.Integer] =
41-
new java.lang.Integer(_)
41+
java.lang.Integer.valueOf(_)
4242
```
4343

4444
2. The "magnet" pattern is sometimes used to express many variants of a method. Instead of defining overloaded versions of the method, one can also let the method take one or more arguments of specially defined "magnet" types, into which various argument types can be converted. E.g.

0 commit comments

Comments
 (0)