Indirect evals should be strict with -strict option

XMLWordPrintable

    • Type: Bug
    • Resolution: Fixed
    • Priority: P4
    • 9
    • Affects Version/s: 9
    • Component/s: 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.

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

                Created:
                Updated:
                Resolved: