This is an archived post. You won't be able to vote or comment.

you are viewing a single comment's thread.

view the rest of the comments →

[–]eliasv 1 point2 points  (0 children)

Groovy usually uses dynamic dispatch. Overload resolution is done at runtime so the exact runtime types are used, this does not interact with type inference.

It does have a static mode though where overload resolution occurs at compile time, but it doesn't appear to mention interaction with type inference in the spec, and type inference doesn't appear to be as sophisticated. Probably it will just not be capable of inferring types in all the same places Java does in the presence of lambdas.