summaryrefslogtreecommitdiff
path: root/test/files/neg/unit2anyref.check
blob: 2616fd35f955db7f63aab131f9ae82ccb3428c7e (plain) (blame)
1
2
3
4
5
6
7
8
unit2anyref.scala:2: error: type mismatch;
 found   : Unit
 required: 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