Skip to content

node-8.9.3 two immediate execution function error #18275

Description

@hhxx1994
  • Version: 8.9.3
  • Platform: window 7 x64 webstorm 2017.3.3
(() => console.log("a"))()
(() => console.log("b"))()
(() => console.log("b"))()
^

TypeError: (intermediate value)(...) is not a function
    at Object.<anonymous> (D:\workspace\fb\helloworld\helloworld.js:2:1)
    at Module._compile (module.js:635:30)
    at Object.Module._extensions..js (module.js:646:10)
    at Module.load (module.js:554:32)
    at tryModuleLoad (module.js:497:12)
    at Function.Module._load (module.js:489:3)
    at Function.Module.runMain (module.js:676:10)
    at startup (bootstrap_node.js:187:16)
    at bootstrap_node.js:608:3
a

but if I add a semicolon to one line is ok,like this

(() => console.log("a"))();
(() => console.log("b"))()

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions