I need help trying to get my anonymous function to compile in Scala.
See below:
private def mapBlock(helper: Helper): (Any) => Block = {
(original: Any) => {
val block = original.asInstanceOf[Block]
// logic with helper here
return block
}
}
However, when I compile this I get "Expression of type block does not conform to expected"
What am I doing wrong here?