+
Skip to content

Conversation

arendjr
Copy link
Contributor

@arendjr arendjr commented Jul 16, 2025

Summary

Fixed #6777: Fixed type inference handling of this to avoid infinite recursion.

Thanks to @sterliakov for the thorough investigation!

Test Plan

Test added.

Copy link

changeset-bot bot commented Jul 16, 2025

🦋 Changeset detected

Latest commit: 794c6f5

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 13 packages
Name Type
@biomejs/biome Patch
@biomejs/cli-win32-x64 Patch
@biomejs/cli-win32-arm64 Patch
@biomejs/cli-darwin-x64 Patch
@biomejs/cli-darwin-arm64 Patch
@biomejs/cli-linux-x64 Patch
@biomejs/cli-linux-arm64 Patch
@biomejs/cli-linux-x64-musl Patch
@biomejs/cli-linux-arm64-musl Patch
@biomejs/wasm-web Patch
@biomejs/wasm-bundler Patch
@biomejs/wasm-nodejs Patch
@biomejs/backend-jsonrpc Patch

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

@arendjr arendjr requested review from a team July 16, 2025 08:51
@github-actions github-actions bot added A-Linter Area: linter L-JavaScript Language: JavaScript and super languages A-Type-Inference Area: type inference labels Jul 16, 2025
@arendjr arendjr force-pushed the fix-this-handling branch from 3a767b6 to 794c6f5 Compare July 16, 2025 09:13
@github-actions github-actions bot added the A-Project Area: project label Jul 16, 2025
@arendjr arendjr merged commit c9e969a into biomejs:main Jul 16, 2025
12 checks passed
@github-actions github-actions bot mentioned this pull request Jul 16, 2025
arendjr added a commit to arendjr/biome that referenced this pull request Jul 16, 2025

impl TypeofThisOrSuperExpression {
fn from_any_js_expression(scope_id: ScopeId, expr: &AnyJsExpression) -> Self {
let binds_this = |node: &JsSyntaxNode| {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I shared this change as a patch (instead of PR) because that's still not how this works:( This was a really lazy minimal filter I wrote as a POC, not a real solution. For example,

class A {
    const a = 1;
    const b = this.a;
}

does not have any functions, and yet this in this.a is resolved correctly to the enclosing class... Could you at least add a // TODO somewhere here?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

A-Linter Area: linter A-Project Area: project A-Type-Inference Area: type inference L-JavaScript Language: JavaScript and super languages

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

💅 nursery/noMisusedPromises causes stack overflow

2 participants

点击 这是indexloc提供的php浏览器服务,不要输入任何密码和下载