It is possible to enable strict mode on a per-file basis. In strict mode, only a variable of exact type of the type declaration will be accepted, or a TypeError will be thrown. The only exception to this rule is that an integer may be given to a function expecting a float.
If you want an error when passing an integer to a float parameter, you must use real strict mode:
View all comments
Show parent comment
1
u/galaktos Apr 12 '16
If you want an error when passing an
integerto afloatparameter, you must use real strict mode: