XMLWordPrintable

    • Icon: Sub-task Sub-task
    • Resolution: Duplicate
    • Icon: P4 P4
    • None
    • None
    • core-libs
    • None


      >jrunscript
      nashorn> bbb=1
      1
      nashorn> bbb==1 (1)<-------------
      true
      nashorn> delete bbb
      true
      nashorn> bbb==1
      false
      nashorn>

      >jrunscript
      nashorn> bbb=1
      1
      nashorn> delete bbb
      true
      nashorn> bbb==1
      script error: ReferenceError: "bbb" is not defined in <STDIN> at line number 1
      nashorn>

      They differ only in the execution of the statement 1.
      This is only a test, and as such it should not tamper the symbol table of the engine. However, it seems that it does because it makes the last statement executed behave differently: in the first case, the symbol bbb seems to resist to its deletion, while in the second case it is actually deleted (and a reference to it rejected with an exception).

            hannesw Hannes Wallnoefer
            sundar Sundararajan Athijegannathan
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved: