New issue
Advanced search Search tips
Note: Color blocks (like or ) mean that a user may not be available. Tooltip shows the reason.
Starred by 3 users
Status: Available
Owner: ----
Cc:
Components:
HW: All
OS: All
Priority: 2
Type: Bug



Sign in to add a comment
Wrong evaluation order for keyed lookup
Project Member Reported by arv@chromium.org, Jun 25 2015 Back to list
  'language/expressions/assignment/S11.13.1_A7_T1': [FAIL],
  'language/expressions/assignment/S11.13.1_A7_T2': [FAIL],
  'language/expressions/assignment/S11.13.1_A7_T3': [FAIL],

One example:

assert.throws(TypeError, function() {
  var base = null;
  var prop = {
    toString: function() {
      $ERROR("property key evaluated");
    }
  };
  var expr = function() {
    $ERROR("right-hand side expression evaluated");
  };

  base[prop] = expr();
});

null is not a valid object so we should not do the ToName for prop
 
Comment 1 by arv@chromium.org, Jun 26 2015
Also see https://bugs.ecmascript.org/show_bug.cgi?id=4379 which might result in a spec change.
Cc: mstarzinger@chromium.org
Status: PendingFurtherInfo
Waiting for spec resolution
Related: v8:4248
Labels: Test262Failures
Status: Available
Marking as 'Available' as PendingFurtherInfo makes it not open, but this is still an issue to resolve.
Labels: -test262failures Hotlist-test262
Comment 6 by adamk@chromium.org, Apr 7 2016
Owner: ----
The conclusion from the most recent TC39 meeting is that the spec will remain as-is. SpiderMonkey is working to move to the specced behavior (which they already supported for increment/decrement, but not for compound assignment), which should give us a bit more confidence that no real code depends on this.
Labels: SpecViolation-Backlog
Labels: Priority-2
Cc: gsat...@chromium.org
Sign in to add a comment