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

Class-based REPL does not support defining value classes

    Details

    • Type: Bug
    • Status: Open
    • Priority: Major
    • Resolution: Unresolved
    • Affects Version/s: Scala 2.11.0, Scala 2.12.0-M5
    • Fix Version/s: Backlog
    • Component/s: Repl / Interpreter
    • Labels:
      None

      Description

      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.

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                Unassigned
                Reporter:
                jodersky jodersky
              • Votes:
                0 Vote for this issue
                Watchers:
                2 Start watching this issue

                Dates

                • Created:
                  Updated: