diff options
author | Paul Phillips <paulp@improving.org> | 2009-06-22 20:26:34 +0000 |
---|---|---|
committer | Paul Phillips <paulp@improving.org> | 2009-06-22 20:26:34 +0000 |
commit | c22ebf74e0ec17d18bf097c1d47426bd647010a5 (patch) | |
tree | af3b6479902ecc6c98931d9b7e6ca786d1cfb80f /test/files/neg/unit2anyref.check | |
parent | 2ebff1417c9cfd39251a6a95a72c17af24b813c1 (diff) | |
download | scala-c22ebf74e0ec17d18bf097c1d47426bd647010a5.tar.gz scala-c22ebf74e0ec17d18bf097c1d47426bd647010a5.tar.bz2 scala-c22ebf74e0ec17d18bf097c1d47426bd647010a5.zip |
Attempted to resolve the improbable mess surrou...
Attempted to resolve the improbable mess surrounding implicit
conversions from Unit. Modified test case which relied on the supposedly
verboten behavior; verbotenized () => AnyRef; added new test case which
fails if verboten behavior should ever return.
Diffstat (limited to 'test/files/neg/unit2anyref.check')
-rw-r--r-- | test/files/neg/unit2anyref.check | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/test/files/neg/unit2anyref.check b/test/files/neg/unit2anyref.check new file mode 100644 index 0000000000..6459949341 --- /dev/null +++ b/test/files/neg/unit2anyref.check @@ -0,0 +1,10 @@ +unit2anyref.scala:2: error: type mismatch; + found : Unit + required: AnyRef +Note that implicit conversions are not applicable because they are ambiguous: + both method orderingToOrdered in object Predef of type [T](x: T)(implicit ord: Ordering[T])Ordered[T] + and method any2stringadd in object Predef of type (x: Any)scala.runtime.StringAdd + are possible conversion functions from Unit to AnyRef + val x: AnyRef = () // this should not succeed. + ^ +one error found |