summaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authorPaul Phillips <paulp@improving.org>2010-02-27 20:10:48 +0000
committerPaul Phillips <paulp@improving.org>2010-02-27 20:10:48 +0000
commit646c478b3aeb05079c915c217272bcb64dc324fc (patch)
tree49b13dbe0a74b6bd4b70e709c4ea7e7f392858cb /test
parentddecf6008320f148b3e06ee76d4b81376546db98 (diff)
downloadscala-646c478b3aeb05079c915c217272bcb64dc324fc.tar.gz
scala-646c478b3aeb05079c915c217272bcb64dc324fc.tar.bz2
scala-646c478b3aeb05079c915c217272bcb64dc324fc.zip
Special cased an error message for the common s...
Special cased an error message for the common situation of calling AnyRef methods on Any or AnyVal. Review by odersky.
Diffstat (limited to 'test')
-rw-r--r--test/files/neg/unit2anyref.check6
1 files changed, 2 insertions, 4 deletions
diff --git a/test/files/neg/unit2anyref.check b/test/files/neg/unit2anyref.check
index 7af4564ffb..2616fd35f9 100644
--- a/test/files/neg/unit2anyref.check
+++ b/test/files/neg/unit2anyref.check
@@ -1,10 +1,8 @@
unit2anyref.scala:2: error: type mismatch;
found : Unit
required: AnyRef
-Note that implicit conversions are not applicable because they are ambiguous:
- both method any2stringadd in object Predef of type (x: Any)scala.runtime.StringAdd
- and method any2ArrowAssoc in object Predef of type [A](x: A)ArrowAssoc[A]
- are possible conversion functions from Unit to AnyRef
+Note: primitive types are not implicitly converted to AnyRef.
+You can safely force boxing by casting x.asInstanceOf[AnyRef].
val x: AnyRef = () // this should not succeed.
^
one error found