scala - 'wrong top statement declaration' when using slick in IntelliJ -


i'm porting project scala 2.9 2.10, therefore have use slick instead of scalaquery. i'm using slick 2.1.0 since supports ms access.

according this tutorial , upgrade guide changed robs object class , added val robs:

error defining val robs

why error message wrong top statement declaration , how rid of it?

edit: i'm new scala... according this question seems can't put val outside of methods or classes, right? code above directly in packge. right approach slick then? should move code in class or trait?

according this changed

val robs = tablequery[robs]

to

object robs extends tablequery(new robs(_)) {}.

no warnings or errors anymore. :)


Comments

Popular posts from this blog

PySide and Qt Properties: Connecting signals from Python to QML -

c# - DevExpress.Wpf.Grid.InfiniteGridSizeException was unhandled -