Details
-
Bug
-
Resolution: Fixed
-
P4
-
None
-
13
Description
A DESCRIPTION OF THE PROBLEM :
#Testcase:
var foo = function(){
Array.prototype.pop.call(false);
print("here");
};
foo();
#Command:
./nashorn/jdk-13.0.1/bin/jjs --no-syntax-extensions=true --no-deprecation-warning=true testcase.js
#Output:
testcase.js:2 TypeError: false is not an Object.
#Expected output:
here
#Description:
According to ES standard , when running this testcase, false should be converted to the Object in line 2, but nashorn threw a TypeError exceptionï¼false is not an Object.
The references are as follows:
http://www.ecma-international.org/ecma-262/5.1/index.html#sec-15.3.4.4
http://www.ecma-international.org/ecma-262/5.1/index.html#sec-15.4.4.6
#Testcase:
var foo = function(){
Array.prototype.pop.call(false);
print("here");
};
foo();
#Command:
./nashorn/jdk-13.0.1/bin/jjs --no-syntax-extensions=true --no-deprecation-warning=true testcase.js
#Output:
testcase.js:2 TypeError: false is not an Object.
#Expected output:
here
#Description:
According to ES standard , when running this testcase, false should be converted to the Object in line 2, but nashorn threw a TypeError exceptionï¼false is not an Object.
The references are as follows:
http://www.ecma-international.org/ecma-262/5.1/index.html#sec-15.3.4.4
http://www.ecma-international.org/ecma-262/5.1/index.html#sec-15.4.4.6