Skip to content

Named functions with -d switch don't compile #151

@anttih

Description

@anttih

Named functions don't compile when auto-importing prelude with the -d switch.

$ echo "function hello\n  1" | livescript -c -d -s
SyntaxError: misplaced function declaration on line 3

$ echo "function hello\n  1" | livescript -c -s
(function(){
  function hello(){
    return 1;
  }
}).call(this);

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions