Add type annotations#648
Conversation
|
This goes farther than I would personally go in a codebase I worked heavily on; something like e.g. Regardless, I don't actually object to this being merged if you think it's a win overall. Oh, heh, you hit "merge" right as I was writing this comment :-) |
Oops :( You are right, some of the type annotations I added are trivial, but I wanted everything explicit because in some cases what I think the type is, what the IDE thinks and what the compiler thinks are all different... |
|
It's fine, suit yourself! |
|
Thanks! |
Added type annotations for
vals,vars anddefs that did not have them; primary motivation: clarity.Types inferred by IDEs like IntelliJ Idea are not always the types inferred by the Scala compiler.
In fact, different versions of the Scala compiler infer types differently!
As a result, in around 20 places it is impossible to add missing type annotations without breaking binary compatibility...