Quick question regrading how to define a value class in scala
Here is typical example:
class Wrapper(val underlying: Int) extends AnyVal
I am getting next error:
/usr/home/User/scala2/scala_lerning/src3/val.scala:1: error: value class may not be a member of another class
class Wrapper(val underlying: Int) extends AnyVal
^
one error found
OS: FreeBSD 10.2 Scala code runner version 2.11.7 -- Copyright 2002-2013, LAMP/EPFL
Could anyone help with this?
Thanks