summaryrefslogblamecommitdiff
path: root/test/files/neg/anyval-anyref-parent.check
blob: e1903f5fccd492bb98d24eee50067576f7c5f8c5 (plain) (tree)
1
2
3
4
5
6
7
8
9
10


                                                                                           


                                                                    



                                                                                               



                                             
                                                                            



                                                  



                                                                                            
anyval-anyref-parent.scala:2: error: Only classes (not traits) are allowed to extend AnyVal
trait Foo2 extends AnyVal // fail
      ^
anyval-anyref-parent.scala:5: error: Any does not have a constructor
class Bar1 extends Any      // fail
           ^
anyval-anyref-parent.scala:6: error: Value class needs to have exactly one public val parameter
class Bar2(x: Int) extends AnyVal // fail
      ^
anyval-anyref-parent.scala:10: error: illegal inheritance; superclass Any
 is not a subclass of the superclass Object
 of the mixin trait Immutable
trait Foo4 extends Any with Immutable // fail
                            ^
anyval-anyref-parent.scala:11: error: illegal inheritance; superclass AnyVal
 is not a subclass of the superclass Object
 of the mixin trait Immutable
trait Foo5 extends AnyVal with Immutable   // fail
                               ^
anyval-anyref-parent.scala:11: error: Only classes (not traits) are allowed to extend AnyVal
trait Foo5 extends AnyVal with Immutable   // fail
      ^
6 errors found