Skip to content

test(transformer/nullish-coalescing): failing test#8051

Merged
graphite-app[bot] merged 1 commit intomainfrom
12-20-test_transformer_nullish-coalescing_failing_test
Dec 21, 2024
Merged

test(transformer/nullish-coalescing): failing test#8051
graphite-app[bot] merged 1 commit intomainfrom
12-20-test_transformer_nullish-coalescing_failing_test

Conversation

@overlookmotel
Copy link
Member

@overlookmotel overlookmotel commented Dec 20, 2024

Add failing test for nullish coalescing operator. The output is correct, but temp var is created in wrong scope.

My guess is that it needs to use current_hoist_scope_id, not current_scope_id.

This test from class properties also shows the same problem:

* interaction-with-other-transforms/input.js
Bindings mismatch:
after transform: ScopeId(0): ["C", "C2", "_ref", "_ref2"]
rebuilt : ScopeId(0): ["C", "C2", "_a", "_e", "_g", "_ref", "_ref2"]
Bindings mismatch:
after transform: ScopeId(1): ["_a", "_e", "_g"]
rebuilt : ScopeId(1): []
Symbol scope ID mismatch for "_a":
after transform: SymbolId(4): ScopeId(1)
rebuilt : SymbolId(0): ScopeId(0)
Symbol scope ID mismatch for "_e":
after transform: SymbolId(5): ScopeId(1)
rebuilt : SymbolId(1): ScopeId(0)
Symbol scope ID mismatch for "_g":
after transform: SymbolId(6): ScopeId(1)
rebuilt : SymbolId(2): ScopeId(0)

Copy link
Member Author

overlookmotel commented Dec 20, 2024


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.

@github-actions github-actions bot added A-transformer Area - Transformer / Transpiler C-test Category - Testing. Code is missing test cases, or a PR is adding them labels Dec 20, 2024
@overlookmotel overlookmotel marked this pull request as ready for review December 20, 2024 15:49
@camc314 camc314 self-requested a review December 20, 2024 18:53
@graphite-app graphite-app bot added the 0-merge Merge with Graphite Merge Queue label Dec 21, 2024
@graphite-app
Copy link
Contributor

graphite-app bot commented Dec 21, 2024

Merge activity

Boshen pushed a commit that referenced this pull request Dec 21, 2024
Add failing test for nullish coalescing operator. The output is correct, but temp var is created in wrong scope.

My guess is that it needs to use `current_hoist_scope_id`, not `current_scope_id`.

This test from class properties also shows the same problem: https://github.com/oxc-project/oxc/blob/ac097e916051288cc982136e4e22c2766cb4bd91/tasks/transform_conformance/snapshots/oxc.snap.md?plain=1#L20-L35
@Boshen Boshen force-pushed the 12-20-test_transformer_nullish-coalescing_failing_test branch from 44bd7d2 to 74cb306 Compare December 21, 2024 07:03
Add failing test for nullish coalescing operator. The output is correct, but temp var is created in wrong scope.

My guess is that it needs to use `current_hoist_scope_id`, not `current_scope_id`.

This test from class properties also shows the same problem: https://github.com/oxc-project/oxc/blob/ac097e916051288cc982136e4e22c2766cb4bd91/tasks/transform_conformance/snapshots/oxc.snap.md?plain=1#L20-L35
@Boshen Boshen force-pushed the 12-20-test_transformer_nullish-coalescing_failing_test branch from 74cb306 to 3d83396 Compare December 21, 2024 07:08
@graphite-app graphite-app bot merged commit 3d83396 into main Dec 21, 2024
@graphite-app graphite-app bot deleted the 12-20-test_transformer_nullish-coalescing_failing_test branch December 21, 2024 07:17
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

0-merge Merge with Graphite Merge Queue A-transformer Area - Transformer / Transpiler C-test Category - Testing. Code is missing test cases, or a PR is adding them

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants