From ddb3b889b5fa55760167d9995d2f1549e2542b71 Mon Sep 17 00:00:00 2001 From: Jason Zaugg Date: Tue, 11 Sep 2012 23:40:11 +0200 Subject: 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. --- src/compiler/scala/tools/nsc/typechecker/ContextErrors.scala | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/compiler/scala/tools/nsc/typechecker') 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 -- cgit v1.2.3