これは機能します:(1 to 5).reduceLeft( _+_ )
しかし、これはしません:(x:Int,y:Int)=>_+_
<console>:8: error: missing parameter type for expanded function ((x$1, x$2) => x$1.$plus(x$2))
(x:Int,y:Int)=>_+_
^
<console>:8: error: missing parameter type for expanded function ((x$1: <error>, x$2) => x$1.$plus(x$2))
(x:Int,y:Int)=>_+_
^
最初のケースでは無名関数 ( _+_
) が正常にコンパイルされましたが、2 番目のケースでは失敗したため、一貫性がありません。
私が見逃したものや間違っているものはありますか?それとも単なる構文定義ですか?