Better type inference for Scala: send us your problematic cases!

@guizmaii This particular example works with Dotty, though more complex examples involving folds do not work, e.g. List(1).foldLeft(Nil)((acc, x) => x :: acc) fails, because we desugar the lambda to a method, and we need to give types to the method parameters, but these types haven’t been fully inferred yet. I’d like to see if I can improve this, but no promise for now :).

4 Likes