The error it yields is:
Funct.scala:5: 'val' expected but identifier found.
[error] class Funct[In,Out](function: In => Out, description: String, implicit m: Manifest[In => Out]) {
and the code in question is:
import scala.reflect.Manifest;
class Funct[In,Out](function: In => Out, description: String, implicit m: Manifest[In => Out]) {
def isType[K](implicit man: Manifest[K]) = {
m <:< man
}
def Apply(input: In): Out = {
function.Apply(input)
}
def toString() = {
description + m
}
}
I simply do not see what the problem is.
There are a few problems you should be able to figure out, but the message is indeed a bit confusing.
The issue here is that the
implicitkeyword must mark the whole parameter group and not just individual parameters. Try: