{"action":"closed","issue":{"url":"https://api.github.com/repos/tc39/ecma262/issues/1175","repository_url":"https://api.github.com/repos/tc39/ecma262","labels_url":"https://api.github.com/repos/tc39/ecma262/issues/1175/labels{/name}","comments_url":"https://api.github.com/repos/tc39/ecma262/issues/1175/comments","events_url":"https://api.github.com/repos/tc39/ecma262/issues/1175/events","html_url":"https://github.com/tc39/ecma262/issues/1175","id":315312249,"node_id":"MDU6SXNzdWUzMTUzMTIyNDk=","number":1175,"title":"Wonky evaluation order for SuperProperty","user":{"login":"jridgewell","id":112982,"node_id":"MDQ6VXNlcjExMjk4Mg==","avatar_url":"https://avatars1.githubusercontent.com/u/112982?v=4","gravatar_id":"","url":"https://api.github.com/users/jridgewell","html_url":"https://github.com/jridgewell","followers_url":"https://api.github.com/users/jridgewell/followers","following_url":"https://api.github.com/users/jridgewell/following{/other_user}","gists_url":"https://api.github.com/users/jridgewell/gists{/gist_id}","starred_url":"https://api.github.com/users/jridgewell/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jridgewell/subscriptions","organizations_url":"https://api.github.com/users/jridgewell/orgs","repos_url":"https://api.github.com/users/jridgewell/repos","events_url":"https://api.github.com/users/jridgewell/events{/privacy}","received_events_url":"https://api.github.com/users/jridgewell/received_events","type":"User","site_admin":false},"labels":[{"id":570453972,"node_id":"MDU6TGFiZWw1NzA0NTM5NzI=","url":"https://api.github.com/repos/tc39/ecma262/labels/has%20consensus","name":"has consensus","color":"0e8a16","default":false},{"id":91296566,"node_id":"MDU6TGFiZWw5MTI5NjU2Ng==","url":"https://api.github.com/repos/tc39/ecma262/labels/normative%20change","name":"normative change","color":"5319e7","default":false},{"id":415770861,"node_id":"MDU6TGFiZWw0MTU3NzA4NjE=","url":"https://api.github.com/repos/tc39/ecma262/labels/web%20reality","name":"web reality","color":"bfdadc","default":false}],"state":"closed","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":8,"created_at":"2018-04-18T02:58:41Z","updated_at":"2018-07-18T19:10:35Z","closed_at":"2018-07-18T19:10:35Z","author_association":"MEMBER","body":"Per the spec:\r\n\r\n```\r\nSuperProperty: super [ Expression ]\r\n  1. Let propertyNameReference be the result of evaluating Expression.\r\n  2. Let propertyNameValue be ? GetValue(propertyNameReference).\r\n  3. Let propertyKey be ? ToPropertyKey(propertyNameValue).\r\n  ...\r\n  5. Return ? MakeSuperPropertyReference(propertyKey, strict).\r\n\r\nRuntime Semantics: MakeSuperPropertyReference(propertyKey, strict)\r\n  1. Let env be GetThisEnvironment( ).\r\n  ...\r\n  3. Let actualThis be ? env.GetThisBinding().\r\n  ...\r\n```\r\n\r\nThis differs from regular `MemberExpression`:\r\n\r\n```\r\nMemberExpression: MemberExpression [ Expression ]\r\n  1. Let baseReference be the result of evaluating MemberExpression.\r\n  ...\r\n  3. Let propertyNameReference be the result of evaluating Expression.\r\n\r\n```\r\n\r\nThe fact that we evaluate the the inner `[ Expression ]` before evaluating the `super` feels wrong. I realize `super.property` isn't really a `MemberExpression`, but it looks just like it. This is observable with `super[super(), \"prop\"]`, allowing me to initialize the this binding (`GetThisEnvironment ().BindThisValue(...)`) even after I've referenced it.\r\n\r\nCan we move the `env.GetThisBinding()` into `SuperProperty`'s `RS: Evaluation`?\r\n\r\nAs for real-world implementations of `super[super(), \"prop\"]`:\r\n\r\n| Implemntation | Throws? |\r\n| --- | --- |\r\n| Chrome | Yes |\r\n| Firefox | No |\r\n| Safari | Yes |\r\n| Edge | ~🤷‍♂️~ No |\r\n| Babel | No, but I'm about to change it... |\r\n"}}
{"actor":{"display_login":"ljharb"}}