diff options
author | Jason Zaugg <jzaugg@gmail.com> | 2012-09-11 23:40:11 +0200 |
---|---|---|
committer | Jason Zaugg <jzaugg@gmail.com> | 2012-09-11 23:53:22 +0200 |
commit | ddb3b889b5fa55760167d9995d2f1549e2542b71 (patch) | |
tree | 6e32916bde7f4dccd87b974ae588d7e65acec7ca /src/compiler/scala/tools/nsc/typechecker/ContextErrors.scala | |
parent | ea651e6fe187920d207aa5fe3c645d294e72e627 (diff) | |
download | scala-ddb3b889b5fa55760167d9995d2f1549e2542b71.tar.gz scala-ddb3b889b5fa55760167d9995d2f1549e2542b71.tar.bz2 scala-ddb3b889b5fa55760167d9995d2f1549e2542b71.zip |
A little cleanup along the Any to AnyRef trail.
Followup to 35316be and d3f879a.
- Remove obsolete comments and replace them with a test.
- Don't emit error addendum unless we know we're dealing
with a value class.
Diffstat (limited to 'src/compiler/scala/tools/nsc/typechecker/ContextErrors.scala')
-rw-r--r-- | src/compiler/scala/tools/nsc/typechecker/ContextErrors.scala | 2 |
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 |