summaryrefslogtreecommitdiff
path: root/src/compiler/scala/tools/nsc/typechecker/ContextErrors.scala
diff options
context:
space:
mode:
authorPaul Phillips <paulp@improving.org>2012-09-14 13:09:18 -0700
committerPaul Phillips <paulp@improving.org>2012-09-14 13:09:18 -0700
commitb61a2e31d27e6496ad5ac96758fe8003719cacb0 (patch)
tree21297a4989122d4018cafd1dcbe408e0d290b4e2 /src/compiler/scala/tools/nsc/typechecker/ContextErrors.scala
parent493d16306cf0e836da9c77a4768dd42620dd1a72 (diff)
parentddb3b889b5fa55760167d9995d2f1549e2542b71 (diff)
downloadscala-b61a2e31d27e6496ad5ac96758fe8003719cacb0.tar.gz
scala-b61a2e31d27e6496ad5ac96758fe8003719cacb0.tar.bz2
scala-b61a2e31d27e6496ad5ac96758fe8003719cacb0.zip
Merge pull request #1290 from retronym/ticket/no-implicit-to-anyref
A little cleanup along the Any to AnyRef trail.
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 bbeb549289..5ca4712cd2 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