Classes extending AnyVal cannot be defined in a REPL started with the -Yrepl-class-based option.
E.g.
scala> case class Foo(x: Int) extends AnyVal
error: value class may not be a member of another class
case class Foo(x: Int) extends AnyVal
^
without the -Yrepl-class-based option, everything works as expected.