Skip to content

semantic: discrepancies in super diagnostics compared to TypeScript #13284

@ulrichstark

Description

@ulrichstark

In following code, OXC reports super 2, 3, and 4 and TypeScript reports super 1, 2, 3.

class C {
   public fn() {
      super.superFn(); // 1, only TypeScript

      function sub() {
        super.superFn(); // 2, both
      }

      const obj = {
          fn1: function () {
            super.superFn(); // 3, both
          },
          fn2() {
            super.superFn(); // 4, only OXC
          },
      };
   }
}

OXC Playground

TypeScript Playground

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions