-
Type:
Bug
-
Resolution: Fixed
-
Priority:
P4
-
Affects Version/s: 8u40
-
Component/s: core-libs
-
generic
-
generic
Running b-=a, b*=a, b/=a or b%=a on global variables like: var a=1, b=2 the return type is wrong, we get double instead of int.
I tried with b = b - a and it worked, I got an int.
Repro:
=====
var inspect = Java.type("jdk.nashorn.test.tools.StaticTypeInspector").inspect
var a=1,b=2;
print(inspect(b-=a, " assignment substraction "))
I tried with b = b - a and it worked, I got an int.
Repro:
=====
var inspect = Java.type("jdk.nashorn.test.tools.StaticTypeInspector").inspect
var a=1,b=2;
print(inspect(b-=a, " assignment substraction "))