Uploaded image for project: 'JDK'
  1. JDK
  2. JDK-8087211

Indirect evals should be strict with -strict option

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: P4 P4
    • 9
    • 9
    • core-libs
    • None
    • b70
    • generic
    • generic

        When -strict option, all evals regardless of "direct" or "indirect" have to be strict. This rule is consistent with Rhino.

        With nashorn, all Functions are strict with -strict flag. But indirect evals are not strict with -strict.

        Test script:

        // indirect eval. Undefined variable assignment
        this.eval("x = 44");

        The above should result in ReferenceError with -strict option.

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

                Created:
                Updated:
                Resolved: