Created
July 7, 2013 11:23
-
-
Save fwg/5943185 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
let f(h as (Number) -> Number, x as Number) | |
// h should take a parameter. it does not, but who cares. | |
let v = h(x) | |
// now v should be a Number, right? | |
// because we told GorillaScript up there, of course it can optimize this condition away | |
if (typeof v == "number" or v instanceof Number) | |
v / 1.23 | |
let g() | |
let x = 42 | |
if (x <= 2) | |
1 | |
else | |
{wat: "wat"} | |
alert(f(g, 2)) // NaN, obviously. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment