Skip to content

Remove references to java.util.Date #3029

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Jul 25, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion _overviews/core/implicit-classes.md
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,7 @@ Implicit classes have the following restrictions:
**2. They may only take one non-implicit argument in their constructor.**


implicit class RichDate(date: java.util.Date) // OK!
implicit class RichDate(date: java.time.LocalDate) // OK!
implicit class Indexer[T](collection: Seq[T], index: Int) // BAD!
implicit class Indexer[T](collection: Seq[T])(implicit index: Index) // OK!

Expand Down
2 changes: 1 addition & 1 deletion _style/scaladoc.md
Original file line number Diff line number Diff line change
Expand Up @@ -208,7 +208,7 @@ sure to indicate the actual method names:
* @return a new Person instance with the age determined by the
* birthdate and current date.
*/
def apply(name: String, birthDate: java.util.Date) = {}
def apply(name: String, birthDate: java.time.LocalDate) = {}
}

If your object holds implicit conversions, provide an example in the
Expand Down
2 changes: 1 addition & 1 deletion _zh-cn/overviews/core/implicit-classes.md
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ Scala 2.10引入了一种叫做隐式类的新特性。隐式类指的是用impl

2. 构造函数只能携带一个非隐式参数。
````
implicit class RichDate(date: java.util.Date) // 正确!
implicit class RichDate(date: java.time.LocalDate) // 正确!
implicit class Indexer[T](collecton: Seq[T], index: Int) // 错误!
implicit class Indexer[T](collecton: Seq[T])(implicit index: Index) // 正确!
````
Expand Down
Loading