From 6580fabec507e8d56c8f6cfc1a7a7b97dcd5ef99 Mon Sep 17 00:00:00 2001 From: Som Snytt Date: Fri, 21 Jan 2022 11:46:04 -0800 Subject: [PATCH] Tweak overview about implicit case class --- _overviews/core/implicit-classes.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/_overviews/core/implicit-classes.md b/_overviews/core/implicit-classes.md index 0d68489d49..39694e9caa 100644 --- a/_overviews/core/implicit-classes.md +++ b/_overviews/core/implicit-classes.md @@ -80,9 +80,9 @@ While it's possible to create an implicit class with more than one non-implicit aren't used during implicit lookup. -**3. There may not be any method, member or object in scope with the same name as the implicit class.** +**3. The `implicit def` introduced by `implicit class` must not be ambiguous with respect to other term members.** -*Note: This means an implicit class cannot be a case class*. +*Note: This means an implicit class cannot be a case class, since the `implicit def` would be ambiguous with the companion `apply`*. object Bar implicit class Bar(x: Int) // BAD!