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

Print this page

        

@@ -150,10 +150,14 @@
 
         if (symbol.isConst()) {
             flags |= Property.NOT_WRITABLE;
         }
 
+        if (symbol.isBlockScoped()) {
+            flags |= Property.IS_LEXICAL_BINDING;
+        }
+
         // Mark symbol as needing declaration. Access before declaration will throw a ReferenceError.
         if (symbol.isBlockScoped() && symbol.isScope()) {
             flags |= Property.NEEDS_DECLARATION;
         }