Open Bug 1497011 Opened 1 year ago Updated 4 months ago
[meta] Bugs that wouldn't exist if Java
Script were a statically typed language
Bug 1452820, a long-standing intermittent test failure, was caused because a developer wrote "window.scrollYMax" instead of "window.scrollMaxY". The resulting "undefined" value then silently produced "false" in a comparison, rather than producing an exception or other error. In a statically typed language, this would have been caught at compile time with an error like "property 'scrollYMax' does not exist".
see also : bug 1308901 (using Flow for static analysis of JS, which includes type checking )
You need to log in before you can comment on or make changes to this bug.