Skip to content
This repository has been archived by the owner. It is now read-only.

Compilation failed on sealed trait with method #16

Closed
LMnet opened this issue Nov 19, 2015 · 0 comments
Closed

Compilation failed on sealed trait with method #16

LMnet opened this issue Nov 19, 2015 · 0 comments
Assignees
Labels

Comments

@LMnet
Copy link
Contributor

LMnet commented Nov 19, 2015

Here is the example of code:

@pushka
sealed trait OperationData {
  def length: Int
}

object OperationData {

  case object Void extends OperationData {
    def length: Int = 0
  }

  case class Str(value: String) extends OperationData {
    def length: Int = value.length
  }

}

Compilation error:

[error] /home/lmnet/Work/Projects/involve/shared/src/main/scala/involve/domain/OperationData.scala:5: value _rw is not a member of object involve.domain.OperationData.Str
[error] @pushka
[error]  ^

Reproducable on 0.3.0 and 0.3.1 versions.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

No branches or pull requests

2 participants