0

When I declare case object in SBT Console, it creates module

scala> case object A
defined module A

And when I define it in Scala REPL, it creates object

scala> case object A
defined object A

Thanks in advance!

1 Answers1

2

There is no difference in using the Scala REPL or SBT Console. The difference you are seeing is probably because of Scala Version. Cross check the Scala Version on Scala REPL and SBT Console it will be different as in Scala with version 10 series case object is defined as module but after Scala version 11 series they show object.

You can check the Scala version when you are opening the SBT Console or Scala REPL

You can also refer to this.

Hope this clears your doubt.

Thanks

Mahesh Chand
  • 3,158
  • 19
  • 37
Akash Sethi
  • 2,284
  • 1
  • 20
  • 40