src/jdk.scripting.nashorn/share/classes/jdk/nashorn/internal/codegen/MapCreator.java

Print this page

        

@@ -98,19 +98,21 @@
         assert tuples != null;
 
         for (final MapTuple<T> tuple : tuples) {
             final String key    = tuple.key;
             final Symbol symbol = tuple.symbol;
+            final Class<?> initialType = tuple.getValueType();
 
             //TODO initial type is object here no matter what. Is that right?
             if (symbol != null && !isValidArrayIndex(getArrayIndex(key))) {
                 final int flags = getPropertyFlags(symbol, hasArguments, false);
                 properties.add(
                         new SpillProperty(
                                 key,
                                 flags,
-                                spillIndex++));
+                                spillIndex++,
+                                initialType));
             }
         }
 
         return PropertyMap.newMap(properties, structure.getName(), 0, 0, spillIndex);
     }