Skip to content

Async function execute in different version got different output about async function itself #1733

Closed
@Jiasm

Description

@Jiasm
  • Node.js Version: 11.7.0 & 10.15.0
  • OS: macOS
  • Scope (install, code, runtime, meta, other?): runtime

I found an interesting things,
Simple test code:

async function test () {
  await 1
}

console.log(test.constructor.name, test.prototype)

test()

console.log(test.constructor.name, test.prototype)

When I use the 10.15.0 version, I got two different outputs.
This does not appear on the 11.7.0 version.

image

I did not find the relevant modification record on the ChangeLog.
I'm not sure if it is a bug fix, or an implementation change. Can you provide the corresponding information?
I'm more interested in this, thank you.

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