Skip to content
This repository has been archived by the owner on Jul 31, 2018. It is now read-only.

Esprima Keyword Bug #20

Open
IgnoredAmbience opened this issue May 1, 2015 · 4 comments
Open

Esprima Keyword Bug #20

IgnoredAmbience opened this issue May 1, 2015 · 4 comments

Comments

@IgnoredAmbience
Copy link
Member

tests/test262/ch10/10.1/10.1.1/10.1.1-17-s.js:

function testcase() {
        "use strict";
        try {
            var obj = {};
            Object.defineProperty(obj, "accProperty", {
                get: function () {
                    eval("public = 1;");
                    return 11;
                }
            });

            var temp = obj.accProperty === 11;
            return false;
        } catch (e) {
            return e instanceof SyntaxError;
        }
    }
runTestCase(testcase);

stdout:

A variable [__$ERROR__] is defined at global scope.  Its value is:
"runTestCase returned false"

stderr:

Warning:  JsNumber.to_string called.  This might be responsible for errors.  Argument value:  0..
Warning:  JsNumber.to_string called.  This might be responsible for errors.  Argument value:  0..
Warning:  JsNumber.to_string called.  This might be responsible for errors.  Argument value:  0..
Warning:  JsNumber.to_string called.  This might be responsible for errors.  Argument value:  0..
Warning: ref_get_value returns the undefined value on Coq_resvalue_value: undefined
Warning: ref_get_value returns the undefined value on Coq_resvalue_value: undefined
@IgnoredAmbience
Copy link
Member Author

Test aborts on public: NYI.
Test fails on conrad's branch, as above.
Not tested master (yet, not sure if it has been merged through).

@IgnoredAmbience
Copy link
Member Author

This is a bug in esprima. (Thanks again @Pasteuriser)

Try entering into the online parser:

"use strict";
var public = 1;
"use strict";
public = 1;

And observe the discrepancy.

This is still to be reported to esprima.

@IgnoredAmbience IgnoredAmbience changed the title 10.1.1-17-s.js Fails Esprima Keyword Bug May 1, 2015
@conrad-watt
Copy link

jquery/esprima#1171

@IgnoredAmbience
Copy link
Member Author

This issue will be fixed in Esprima 2.6.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

2 participants