Skip to content

Unnecessary RequireObjectCoercible in String.prototype.matchAll #1851

Open
@anba

Description

@anba

https://tc39.es/ecma262/#sec-string.prototype.matchall, step 2.b.ii can be removed, because both null and undefined will also result in a TypeError in step 2.b.iii, because neither "null" nor "undefined" contain "g".

Explicitly listing the two allowed cases (Type(flags) is String or Type(flags) is Object) don't seem useful to me, therefore removing the complete step 2.b.ii is more in-line with the rest of the spec.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions