In Scala, how do I extend an object with multiple classes? -


how inject app object being extended another?

object foo extends someclass bar {     /* imports */     /* <-- want code here run if within `main` scope --> */    } 

basically want take advantage of app main class (example); without receive error:

java.lang.runtimeexception: no main class detected. 

(so don't need worry defining own def main (args : array[string]))

why not object foo extends someclass bar app? app trait, mixed class effortlessly.


Comments

Popular posts from this blog

java.util.scanner - How to read and add only numbers to array from a text file -

rewrite - Trouble with Wordpress multiple custom querystrings -