summaryrefslogtreecommitdiff
path: root/test/files/neg/no-implicit-to-anyref.check
blob: fe417ad8b095d087e99ed2eb544a47a438534416 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
no-implicit-to-anyref.scala:11: error: the result type of an implicit conversion must be more specific than AnyRef
    1: AnyRef
    ^
no-implicit-to-anyref.scala:17: error: type mismatch;
 found   : Any
 required: AnyRef
    (null: Any): AnyRef
         ^
no-implicit-to-anyref.scala:21: error: type mismatch;
 found   : AnyVal
 required: AnyRef
    (0: AnyVal): AnyRef
      ^
no-implicit-to-anyref.scala:27: error: type mismatch;
 found   : Test.AV
 required: AnyRef
Note that AV extends Any, not AnyRef.
Such types can participate in value classes, but instances
cannot appear in singleton types or in reference comparisons.
    new AV(0): AnyRef
    ^
four errors found