Skip to content

(debugger) in expression position not rejected at parse time #5376

Description

@Oichkatzelesfrettschen

debugger is a Statement production, not an expression. Using it where an expression is required must be a parse-time SyntaxError. Boa accepts it and executes without error.

Repro:

(debugger);

Expected: SyntaxError at parse time
Got: executes silently

Spec: https://tc39.es/ecma262/#sec-debugger-statement

Failing test262: language/statements/debugger/expression.js

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions