Uploaded image for project: 'Scala Programming Language'
  1. Scala Programming Language
  2. SI-5178

regression in overriding methods with default arguments

    Details

      Description

      This compiles under 2.9.1, but under trunk:

      abstract class FileOps {
        def withLock[R](start: Long = 0): Option[R]
      }
       
      trait DefaultFileOps {
        self: DefaultPath =>
        
        override def withLock[R](start: Long = 5): Option[R] = None
      }
       
      class DefaultPath extends FileOps with DefaultFileOps { }
      

      bip.scala:11: error: overriding method withLock$default$1 in class FileOps of type [R]=> Long;
       method withLock$default$1 in trait DefaultFileOps of type [R]=> Long needs `override' modifier
      class DefaultPath extends FileOps with DefaultFileOps { }
            ^
      one error found
      

        Attachments

          Activity

            People

            • Assignee:
              rytz Lukas Rytz
              Reporter:
              extempore Paul Phillips
            • Votes:
              0 Vote for this issue
              Watchers:
              4 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: