This has an easy answer: Function1
is not specialized on Short
arguments, only Int
, Long
, Float
, and Double
. So when you call fun
you need to box on the way in.
Either use your own function class--sadly lacking the convenient shorthand!--or make sure you are not using Short => Boolean
but rather Int => Boolean
(and the types know it). Note that when I said it was easy, I meant only easy to explain the problem: neither solution is all that easy to implement, but at the moment this is what's necessary.