summaryrefslogblamecommitdiff
path: root/test/files/neg/t6534.check
blob: 52e70cfa8a10e50d0d5de869727271fbe51df931 (plain) (tree)
1
2
3
4
5
6
7
8
9
10
11
12











                                                                                                                                        


                                                                                                                                    
                  
                  
t6534.scala:4: warning: Implementation of equals inherited from trait Foo overridden in class Bippy1 to enforce value class semantics
class Bippy1(val x: Int) extends AnyVal with Foo { }  // warn
      ^
t6534.scala:5: warning: Implementation of hashCode inherited from trait Ding overridden in class Bippy2 to enforce value class semantics
class Bippy2(val x: Int) extends AnyVal with Ding { } // warn
      ^
t6534.scala:6: error: redefinition of equals method. See SIP-15, criterion 4. is not allowed in value class
class Bippy3(val x: Int) extends AnyVal { override def equals(x: Any) = false } // error
                                                       ^
t6534.scala:7: error: redefinition of hashCode method. See SIP-15, criterion 4. is not allowed in value class
class Bippy4(val x: Int) extends AnyVal { override def hashCode = -1 }          // error
                                                       ^
t6534.scala:9: error: redefinition of equals method. See SIP-15, criterion 4. is not allowed in value class
case class Bippy6(val x: Int) extends AnyVal { override def productPrefix = "Dingo" ; override def equals(x: Any) = false } // error
                                                                                                   ^
two warnings found
three errors found