scala - Can't launch from an object -


i'm using current version of typesafe scala/eclipse ide. have object (which called positionobj give unique name). positionobj contains main method. yet when try run > scala application pop-up message saying:

positionobj needs 'object' (it 'class').

in fact it's not class, , there no class name. thoughts why happening , how can around it?

here relevant code.

object positionobj { ...      def main(args: array[string] = array[string]()): unit = {        // see if happens.        println(position(3).p1rqmts.keys.head)     }     ... 

thanks.

based on answered-to code, try removing default argument, since might creating different code signature


Comments

Popular posts from this blog

user interface - How to replace the Python logo in a Tkinter-based Python GUI app? -

objective c - Greedy NSProgressIndicator Allocation -

how to set an OCR language in Google Drive -