Skip to content

Commit cd9f6a1

Browse files
ChimengSososila-strike
authored andcommitted
Update ca-implicit-conversions.md
implicit def syntax in scala 2 was return type as User. not String => User.
1 parent 7633afb commit cd9f6a1

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

_overviews/scala3-book/ca-implicit-conversions.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -150,7 +150,7 @@ object `Conversions`:
150150
import scala.language.implicitConversions
151151

152152
object Conversions {
153-
implicit def fromStringToUser(name: String): User = (name: String) => User(name)
153+
implicit def fromStringToUser(name: String): User = User(name)
154154
}
155155
~~~
156156
{% endtab %}

0 commit comments

Comments
 (0)