Skip to content

Comments

fix(semantic): allow super in object method in js but not in ts#13318

Merged
graphite-app[bot] merged 1 commit intomainfrom
08-27-fix_semantic_allow_super_in_object_method_in_js_but_not_in_ts
Aug 27, 2025
Merged

fix(semantic): allow super in object method in js but not in ts#13318
graphite-app[bot] merged 1 commit intomainfrom
08-27-fix_semantic_allow_super_in_object_method_in_js_but_not_in_ts

Conversation

@Boshen
Copy link
Member

@Boshen Boshen commented Aug 27, 2025

closes #13284

Either TypeScript implemented the spec incorrectly or made it more
strict.

class C {
  foo() {
    return {
      bar() {
        super.bar(); // syntax error in ts but not in js
      },
    };
  }
}

@Boshen Boshen requested a review from Dunqing as a code owner August 27, 2025 02:15
@github-actions github-actions bot added A-semantic Area - Semantic C-bug Category - Bug labels Aug 27, 2025
Copy link
Member Author

Boshen commented Aug 27, 2025


How to use the Graphite Merge Queue

Add either label to this PR to merge it via the merge queue:

  • 0-merge - adds this PR to the back of the merge queue
  • hotfix - for urgent hot fixes, skip the queue and merge this PR next

You must have a Graphite account in order to use the merge queue. Sign up using this link.

An organization admin has enabled the Graphite Merge Queue in this repository.

Please do not merge from GitHub as this will restart CI on PRs being processed by the merge queue.

This stack of pull requests is managed by Graphite. Learn more about stacking.

@graphite-app
Copy link
Contributor

graphite-app bot commented Aug 27, 2025

Merge activity

…3318)

closes #13284

Either TypeScript implemented the spec incorrectly or made it more
strict.

```js
class C {
  foo() {
    return {
      bar() {
        super.bar(); // syntax error in ts but not in js
      },
    };
  }
}
```
@graphite-app graphite-app bot force-pushed the 08-27-fix_semantic_allow_super_in_object_method_in_js_but_not_in_ts branch from a953da3 to 8a43068 Compare August 27, 2025 02:20
@codspeed-hq
Copy link

codspeed-hq bot commented Aug 27, 2025

CodSpeed Instrumentation Performance Report

Merging #13318 will not alter performance

Comparing 08-27-fix_semantic_allow_super_in_object_method_in_js_but_not_in_ts (8a43068) with main (5b91f3c)1

Summary

✅ 34 untouched benchmarks

Footnotes

  1. No successful run was found on main (8a43068) during the generation of this report, so 5b91f3c was used instead as the comparison base. There might be some changes unrelated to this pull request in this report.

@graphite-app graphite-app bot merged commit 8a43068 into main Aug 27, 2025
24 checks passed
@graphite-app graphite-app bot deleted the 08-27-fix_semantic_allow_super_in_object_method_in_js_but_not_in_ts branch August 27, 2025 02:25
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

A-semantic Area - Semantic C-bug Category - Bug

Projects

None yet

Development

Successfully merging this pull request may close these issues.

semantic: discrepancies in super diagnostics compared to TypeScript

1 participant