Skip to content

Super can't be used in equality expressions #1242

Closed
@DartBot

Description

@DartBot

This issue was originally filed by [email protected]


The language specification allows to use super as the first operand in an equality expression. However, it can be used only in an expression of the form super == e1. Any other variations of an equality expression(with ===, !== and != operators) cause a compile time error in DartVM and Dartc:

class A {
  test() {
    super === this;
  }
}

class A {
  test() {
    super !== this;
  }
}

class A {
  test() {
    super != this;
  }
}

Metadata

Metadata

Assignees

No one assigned

    Labels

    area-vmUse area-vm for VM related issues, including code coverage, and the AOT and JIT backends.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions