Open ochrons opened 8 years ago
Also see the same issue, it was very frustrating.
Thanks guys, you saved by day. I had different error message, but not less frustrating.
trait Api {
def getMessage: String
}
AutowireServer.route[Api](ApiImpl)
Error:(39, 38) type mismatch;
found : String
required: ?{def apply: ?}
AutowireServer.route[Api](ApiImpl)
^
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.