Scala - object X is not member of package Y -


i have following 2 files:

mainobject.scala

import mypkg.myobject._   object mainobject {} 

mypkg/myobject.scala

package mypkg   object myobject {} 

then when try compile scalac mainobject.scala error

mainobject.scala:1: error: object myobject not member of package mypkg

any idea why error occur?

you need supply 2 files compile scalac:

scalac mainobject.scala mypkg/myobject.scala 

this works fine me code.


Comments

Popular posts from this blog

php - Calling a template part from a post -

Firefox SVG shape not printing when it has stroke -

How to mention the localhost in android -