Secondary constructors have external scope so you don't do something stupid:
class Silly(foo: String) { val bar = 123 def this() = this(bar.toString) }
where are you trying to pass the parameter to the constructor ... after creating it in the constructor.
Unfortunately, this means that import Foo.Bar not suitable for this line. You will need to use the full path of Foo.Bar .
For the entire class, except for additional constructors, Foo.Bar will be in the form of Bar .
source share