-
Bug
-
Resolution: Fixed
-
P4
-
None
-
13
A DESCRIPTION OF THE PROBLEM :
A DESCRIPTION OF THE PROBLEM :
#Version: jdk-13.0.1
#Testcase:
var foo = function(){
var a = Object.setPrototypeOf("test", null);
print(a);
};
foo();
#Command:
./nashorn/jdk-13.0.1/bin/jjs --no-syntax-extensions=true --no-deprecation-warning=true --language=es6 testcase.js
#Output:
testcase.js:2 TypeError: test is not an Object.
#Expected output:
test
#Description:
According to ES standard , when running this testcase, the output should be "test", but nashorn threw a TypeError exceptionï¼test is not an Object.
The references are as follows:
http://www.ecma-international.org/ecma-262/6.0/index.html#sec-object.setprototypeof
A DESCRIPTION OF THE PROBLEM :
#Version: jdk-13.0.1
#Testcase:
var foo = function(){
var a = Object.setPrototypeOf("test", null);
print(a);
};
foo();
#Command:
./nashorn/jdk-13.0.1/bin/jjs --no-syntax-extensions=true --no-deprecation-warning=true --language=es6 testcase.js
#Output:
testcase.js:2 TypeError: test is not an Object.
#Expected output:
test
#Description:
According to ES standard , when running this testcase, the output should be "test", but nashorn threw a TypeError exceptionï¼test is not an Object.
The references are as follows:
http://www.ecma-international.org/ecma-262/6.0/index.html#sec-object.setprototypeof