Some differences/oddities I noticed between referencing and invoking
`super`. I briefly discussed this with Erik Arvidsson at
https://github.com/google/traceur-compiler/issues/1220. In essence, if you
can invoke in two seperate ways, it seems logical that you should be able
to reference in those two ways (super() ~= super.submit(); super !=
super.submit).

```
class ClientForm extends Form{
  submit() {
    super.submit(); // Invokes Form.submit
    let superSubmit = super.submit; // Reference to Form.submit
    superSubmit(); // Invokes, but `this` is now undefined; not sure if
intended

    super(); // Invokes Form.submit
    let superSubmit2 = super; // Error: "Unexpected token ;"
}
```
_______________________________________________
es-discuss mailing list
[email protected]
https://mail.mozilla.org/listinfo/es-discuss

Reply via email to