Skip to content

new Map(wrong_iterable) swallow TypeError in file scripts #16856

Closed
@vsemozhetbyt

Description

@vsemozhetbyt
  • Version: 8–10
  • Platform: Windows 7 x64
  • Subsystem: ?
'use strict';

new Map('a');
// Node.js 4.8.5
new Map('a');
^
TypeError: Iterator value a is not an entry object

// Node.js 6.11.5
new Map('a');
^
TypeError: Iterator value a is not an entry object

// Node.js 8.9.0
<no output>

// Node.js 9.0.0
<no output>

// Node.js 10.0.0 nightly 2017.11.06
<no output>

This only happens with a file script. In the REPL, new Map('a') throws TypeError in all these versions.

Metadata

Metadata

Assignees

No one assigned

    Labels

    confirmed-bugIssues with confirmed bugs.v8 engineIssues and PRs related to the V8 dependency.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions