Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

build [email protected][email protected] 会卡主,原因未知 #371

Closed
sorrycc opened this issue Aug 17, 2023 · 3 comments
Closed
Assignees
Labels
bug Something isn't working

Comments

@sorrycc
Copy link
Member

sorrycc commented Aug 17, 2023

.

@sorrycc sorrycc added the bug Something isn't working label Aug 17, 2023
@sorrycc
Copy link
Member Author

sorrycc commented Sep 11, 2023

报错信息:

thread 'tokio-runtime-worker' panicked at 'internal error:
  entered unreachable code: private should be removed by class_properties',
  /Users/chencheng/.cargo/registry/src/github.com-1ecc6299db9ec823/swc_ecma_transforms_compat-0.156.6/src/es2021/logical_assignments.rs:127:29

@sorrycc
Copy link
Member Author

sorrycc commented Sep 11, 2023

最简复现,

class Foo {
    bar() {
        this.#foo ||= 1;
    }
}

RSPack 正常。

Farm 报错,

private name #foo is not defined.

但是 Farm 加上 #foo 声明后正常。

class Foo {
    #foo: 2;
    bar() {
        this.#foo ||= 1;
    }
}

@zhangpanweb
Copy link
Contributor

class_property include 进来可以临时修,已pr

给 swc 提了个 issue:swc-project/swc#7956

@sorrycc sorrycc closed this as completed Sep 18, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

3 participants