Reported on nashorn-dev: http://mail.openjdk.java.net/pipermail/nashorn-dev/2016-September/006504.html When optimistic conversion is triggered during initialization of an object literal, we have a mechanism to update the property map of the object as the types may (and probably will) have changed. However, this is only done for the top-level object in a nested object initializer. There are cases where the map may have to be updated on outer objects as well, as the example code below shows. The reason is that we may have better type information during recompilation because of type evaluation, for instance. ================================================================= var o = { a: "LEARN_MORE", b: "http:/some.url", }; var m = { x: { z: o.a }, y: o.b }; print(m.x.z); print(m.y); =================================================================== Expected output: LEARN_MORE http:/some.url Actual output: LEARN_MORE 0
|