Skip to content

An error should be thrown when defining a property for a read-only variable in strict mode. #2914

@Implementist

Description

@Implementist

As the title suggests, the testcase is:

var func = function (number) {
    "use strict";
    number.snippetText = "";
};
func(-334918463);

The defination and assignment at the third line leads to an exception when I run this testcase in V8 and SpiderMonkey. But Jerry doesn't throws any exception.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugUndesired behaviour

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions