summaryrefslogtreecommitdiff
path: root/src/compiler/scala/tools/nsc/typechecker/ContextErrors.scala
diff options
context:
space:
mode:
Diffstat (limited to 'src/compiler/scala/tools/nsc/typechecker/ContextErrors.scala')
-rw-r--r--src/compiler/scala/tools/nsc/typechecker/ContextErrors.scala2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/compiler/scala/tools/nsc/typechecker/ContextErrors.scala b/src/compiler/scala/tools/nsc/typechecker/ContextErrors.scala
index b7195b0349..80bb487d2e 100644
--- a/src/compiler/scala/tools/nsc/typechecker/ContextErrors.scala
+++ b/src/compiler/scala/tools/nsc/typechecker/ContextErrors.scala
@@ -106,7 +106,7 @@ trait ContextErrors {
else
s"$name extends Any, not AnyRef"
)
- if (isPrimitiveValueType(found)) "" else "\n" +
+ if (isPrimitiveValueType(found) || isTrivialTopType(tp)) "" else "\n" +
s"""|Note that $what.
|Such types can participate in value classes, but instances
|cannot appear in singleton types or in reference comparisons.""".stripMargin