Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 0 additions & 1 deletion crates/oxc_codegen/src/gen.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2491,7 +2491,6 @@ impl<'a, const MINIFY: bool> Gen<MINIFY> for AccessorProperty<'a> {
p.print_equal();
value.gen_expr(p, Precedence::Assign, Context::default());
}
p.print_semicolon();
}
}

Expand Down
8 changes: 8 additions & 0 deletions crates/oxc_codegen/tests/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -124,6 +124,14 @@ fn new_expr() {
test("new (foo()).bar();", "new (foo()).bar();\n");
}

#[test]
fn access_property() {
test(
"export default class Foo { @x @y accessor #aDef = 1 }",
"export default class Foo {\n\taccessor #aDef=1;\n}\n",
);
}

#[test]
fn for_stmt() {
test("for (let x = 0; x < 10; x++) {}", "for (let x = 0; x < 10; x++) {}\n");
Expand Down
2 changes: 1 addition & 1 deletion tasks/coverage/codegen_sourcemap.snap
Original file line number Diff line number Diff line change
Expand Up @@ -275,7 +275,7 @@ Unexpected token
(29:11-29:15) " y =" --> (25:10-25:12) " y"
(29:15-29:26) " function()" --> (25:12-25:23) "=function()"
(29:26-29:28) " {" --> (25:23-25:24) " "
(29:28-30:1) "}\n" --> (25:24-26:0) "{};;"
(29:28-30:1) "}\n" --> (25:24-26:0) "{};"
(30:1-32:0) "}\n" --> (26:0-27:0) "\n}"
(32:0-32:4) "\nvar" --> (27:0-27:4) "\nvar"
(32:4-32:9) " aa =" --> (27:4-27:9) " aa ="
Expand Down