summaryrefslogblamecommitdiff
path: root/test/files/neg/unit2anyref.check
blob: 7af4564ffb450e9a31d037fc2ba254155c365d5e (plain) (tree)
1
2
3
4
5
6
7
8
9
10



                                                                             

                                                                                   



                                                      
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
  val x: AnyRef = ()  // this should not succeed.
                  ^
one error found