Skip to content
Advertisement

Tag: traits

Scala Sealed trait def to val (How to set value?)

I’m kinda new to Scala and have been working on a piece of code that looks like this: I’m kinda confused about how to set the branch variable which is defined as a def in the trait. When I debug I’d like to see branch as a property of the class so its be can be called as :SomeBank.branch because

Advertisement