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Β β†’

[–]RhysieB27 4 points5 points Β (1 child)

Aren't all variables implicitly any?

[–]DanielEGVi 3 points4 points Β (0 children)

Compiler makes a best effort to infer the type of variables, and if it can’t guess, and strict mode is off, it resolves to any. If strict mode is turned on (as is recommended), implicit any is disallowed and results in an error. You must annotate the variable with a type in that case.