Skip to content

An issue about type of NaN #3878

@NWU-NISL

Description

@NWU-NISL

According to the output of line 6, we can know that the value of hours is NaN, so its type should be number instead of string.

JerryScript version

9ab4872

Build platform
Ubuntu 16.04.6 LTS (Linux 4.15.0-55-generic x86_64)
Build steps
python tools/build.py --clean --debug --logging=on --line-info=on --error-messages=on --cpointer-32bit=on --mem-heap=1572864 --profile=es2015-subset
Test case
var NISLFuzzingFunc=function (nislMutationParameter0){
    var date = new Date(); 
    var a = date.setHours(nislMutationParameter0);
    print(a);
    var hours = date.getHours();
    print(hours);
    print(typeof hours);
};
var nislMutationArgumenter0 = "-";
NISLFuzzingFunc(nislMutationArgumenter0);
Execution steps
build/bin/jerry testcase.js
Output
NaN
NaN
string
Expected behavior
NaN
NaN
number

Metadata

Metadata

Assignees

Labels

bugUndesired behaviour

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions