You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
trait CustomerAPI {
def load: Seq[Customer]
}
val customerAPI = new CustomerAPIService
val router = Router.route[CustomerAPI](customerAPI)
This does't compile and gives a "weird" error:
not enough arguments for method apply: (idx: Int)admin.shared.Customer in trait SeqLike.
[error] Unspecified value parameter idx.
[error] val router = Router.route[CustomerAPI](customerAPI)
[error] ^
It seems to somehow go into the trait and get the load function, for which you would have to call apply with an index.
Adding parentheses to the load function fixes the problem.
trait CustomerAPI {
def load(): Seq[Customer]
}
The text was updated successfully, but these errors were encountered:
Minified example:
This does't compile and gives a "weird" error:
It seems to somehow go into the trait and get the
load
function, for which you would have to callapply
with an index.Adding parentheses to the
load
function fixes the problem.The text was updated successfully, but these errors were encountered: