Sage/streamlinejs — Issue #65: compile error with settimeout in a closure
Author: kr
Created: 2012-01-24 07:52:24+00:00
State: open

I have the following file `x_.js`:

```
(function() {
setTimeout(_, 100);
})();
```

Running the compiler, I get the following output:

```

lime:tmp kr$ node-streamline -c x_.js
Error: error streamlining /Users/kr/tmp/x_.js: : Function contains async calls but does not have _ parameter: undefined at line 2
STACK:
Error: : Function contains async calls but does not have _ parameter: undefined at line 2
at _doIt (/usr/local/lib/node_modules/streamline/lib/callbacks/transform.js:396:76)
at _propagate (/usr/local/lib/node_modules/streamline/lib/callbacks/transform.js:143:20)
at _doIt (/usr/local/lib/node_modules/streamline/lib/callbacks/transform.js:397:12)
at _propagate (/usr/local/lib/node_modules/streamline/lib/callbacks/transform.js:143:20)
at _doIt (/usr/local/lib/node_modules/streamline/lib/callbacks/transform.js:397:12)
at _propagate (/usr/local/lib/node_modules/streamline/lib/callbacks/transform.js:153:58)
at _doIt (/usr/local/lib/node_modules/streamline/lib/callbacks/transform.js:397:12)
at _propagate (/usr/local/lib/node_modules/streamline/lib/callbacks/transform.js:143:20)
at _doIt (/usr/local/lib/node_modules/streamline/lib/callbacks/transform.js:423:17)
at _propagate (/usr/local/lib/node_modules/streamline/lib/callbacks/transform.js:143:20)
at Object.transform (/usr/local/lib/node_modules/streamline/lib/callbacks/transform.js:1409:10)
at _transform (/usr/local/lib/node_modules/streamline/lib/compiler/compile.js:54:19)
at ___ (/usr/local/lib/node_modules/streamline/lib/compiler/compile.js:127:38)
at ___ (/usr/local/lib/node_modules/streamline/lib/callbacks/runtime.js:54:12)
at exports_loadFile__1 (/usr/local/lib/node_modules/streamline/lib/compiler/compile.js:120:40)
at _compile (/usr/local/lib/node_modules/streamline/lib/compiler/compile.js:320:4)
at __1 (/usr/local/lib/node_modules/streamline/lib/compiler/compile.js:336:2)
at exports_each__1 (/usr/local/lib/node_modules/streamline/lib/util/flows.js:49:3)
at exports_compile__2 (/usr/local/lib/node_modules/streamline/lib/compiler/compile.js:335:1)

errors found in 1 files
Error: errors found in 1 files
at __$exports_compile__2 (/usr/local/lib/node_modules/streamline/lib/compiler/compile.js:338:25)
at ___ (/usr/local/lib/node_modules/streamline/lib/callbacks/runtime.js:54:12)
at __$exports_each__1 (/usr/local/lib/node_modules/streamline/lib/util/flows.js:50:9)
at __$exports_each__1 (/usr/local/lib/node_modules/streamline/lib/util/flows.js:49:153)
at ___ (/usr/local/lib/node_modules/streamline/lib/callbacks/runtime.js:54:12)
at __$exports_each__1 (/usr/local/lib/node_modules/streamline/lib/util/flows.js:49:98)
at ___ (/usr/local/lib/node_modules/streamline/lib/callbacks/runtime.js:54:12)
at ___ (/usr/local/lib/node_modules/streamline/lib/callbacks/runtime.js:54:12)
at __tryCatch (/usr/local/lib/node_modules/streamline/lib/callbacks/runtime.js:105:4)
at ___ (/usr/local/lib/node_modules/streamline/lib/compiler/compile.js:323:82)
lime:tmp kr$
```