Welcome to the Scala developers,
Can someone explain to me what is wrong with the type of output in the following code and how it can be fixed.
The following code is a custom action to play 2.2 using Scala 2.10.2
class Test {
trait Entity
class NodeRequest[A,K <:Entity](val entity: K,
val request: Request[A])
extends WrappedRequest[A](request)
def LocateResource[A,K](itemId: Int, v: List[K],
forceOwners:Boolean = true) =
new ActionBuilder[NodeRequest[A,K]]() {
def invokeBlock[A](request: Request[A],
block: (NodeRequest[A,K]) => Future[SimpleResult]) = {
Future.successful(Ok)
}
}
[error] Test.this.NodeRequest[A,K] takes no type parameters, expected: one
[error] def LocateResource[A,K](itemId: Int, v: List[K] , forceOwners:Boolean = true) = new ActionBuilder[NodeRequest[A,K]]() {
[error] ^
source
share