Skip to content

Wrong Realization of Function.length #6282

@zhiyi01

Description

@zhiyi01

Wrong Realization of Function.length by ChakraCore

function func01(a, b) {
    return a + b
}
print(func01.length)
Object.defineProperty(func01, "length", {
    writable: true
})
func01.length = "0x1234"
print(func01.length)

the expected output: 2<--Number ,0x1234<--String
ChakraCore output : 2<--Number ,2<--Number
V8|JSC|SpiderMonkey output : 2<--Number ,0x1234<--String

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