You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
But if you wrap it in parentheses, it doesn't under fibers mode (streamline 0.10.2):
((function(){async(_);})());
The error and stack trace:
Error: Function contains async calls but does not have _ parameter on line 2
<<< async stack >>>
at Node.Walker.call (/path/to/streamline/lib/fibers/transform.js:356:36)
at walk (/path/to/streamline/lib/fibers/walker.js:222:21)
at Node.Walker.semicolon (/path/to/streamline/lib/fibers/transform.js:525:18)
at walk (/path/to/streamline/lib/fibers/walker.js:169:21)
at Array.map (native)
at Node.Walker.function (/path/to/streamline/lib/fibers/transform.js:330:9)
at walk (/path/to/streamline/lib/fibers/walker.js:30:21)
at Node.Walker.call (/path/to/streamline/lib/fibers/transform.js:441:5)
at walk (/path/to/streamline/lib/fibers/walker.js:222:21)
at Node.Walker.semicolon (/path/to/streamline/lib/fibers/transform.js:525:18)
at exports_loadFile__2 (/path/to/streamline/lib/callbacks/compile.js:190:9)
at _compile (/path/to/streamline/lib/callbacks/compile.js:273:4)
at __1 (/path/to/streamline/lib/callbacks/compile.js:306:2)
at value__1 (/path/to/streamline/lib/callbacks/builtins.js:131:28)
at exports_compile__3 (/path/to/streamline/lib/callbacks/compile.js:305:1)
<<< raw stack >>>
at Node.Walker.call (/path/to/streamline/lib/fibers/transform.js:356:36)
at walk (/path/to/streamline/lib/fibers/walker.js:222:21)
at Node.Walker.semicolon (/path/to/streamline/lib/fibers/transform.js:525:18)
at walk (/path/to/streamline/lib/fibers/walker.js:169:21)
at Array.map (native)
at Node.Walker.function (/path/to/streamline/lib/fibers/transform.js:330:9)
at walk (/path/to/streamline/lib/fibers/walker.js:30:21)
at Node.Walker.call (/path/to/streamline/lib/fibers/transform.js:441:5)
at walk (/path/to/streamline/lib/fibers/walker.js:222:21)
at Node.Walker.semicolon (/path/to/streamline/lib/fibers/transform.js:525:18)
It compiles fine in callbacks mode.
—
That's the tiniest repro I could arrive at; my actual use case is something like this CoffeeScript:
# get the first URL from a list of URLs (fetched async'ly)# that matches a given regex:
[url] = (url for url ingetURLs _ whenurl.match regex)
Compiled JS:
// Generated by CoffeeScript 1.6.3varurl;url=((function(){var_i,_len,_ref,_results;_ref=getURLs(_);_results=[];for(_i=0,_len=_ref.length;_i<_len;_i++){url=_ref[_i];if(url.match(regex)){_results.push(url);}}return_results;})())[0];
Notice the parentheses around the IIFE.
The text was updated successfully, but these errors were encountered:
This source JS compiles fine:
But if you wrap it in parentheses, it doesn't under fibers mode (streamline 0.10.2):
The error and stack trace:
It compiles fine in callbacks mode.
—
That's the tiniest repro I could arrive at; my actual use case is something like this CoffeeScript:
Compiled JS:
Notice the parentheses around the IIFE.
The text was updated successfully, but these errors were encountered: