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
9 changes: 9 additions & 0 deletions crates/oxc_codegen/tests/integration/snapshots/minify.snap
Original file line number Diff line number Diff line change
Expand Up @@ -219,3 +219,12 @@ export import b = require("b");

----------
import a = require("a");export import b = require("b");
########## 41
class C {
static
static
static
bar() {}
}
----------
class C{static static;static bar(){}}
13 changes: 13 additions & 0 deletions crates/oxc_codegen/tests/integration/snapshots/ts.snap
Original file line number Diff line number Diff line change
Expand Up @@ -331,3 +331,16 @@ export import b = require("b");
----------
import a = require('a');
export import b = require('b');

########## 41
class C {
static
static
static
bar() {}
}
----------
class C {
static static;
static bar() {}
}
6 changes: 6 additions & 0 deletions crates/oxc_codegen/tests/integration/ts.rs
Original file line number Diff line number Diff line change
Expand Up @@ -118,6 +118,12 @@ export { default as name16 } from "module-name";
import a = require("a");
export import b = require("b");
"#,
"class C {
static
static
static
bar() {}
}",
];

snapshot("ts", &cases);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1800,7 +1800,6 @@ mod test {
"class C { static accessor ['__proto__'] = 0 }",
"class C { static accessor __proto__ = 0 }",
);
test("class C { static static ['__proto__']() {} }", "class C { static __proto__() {} }");

// <https://tc39.es/ecma262/2024/multipage/ecmascript-language-functions-and-classes.html#sec-static-semantics-classelementkind>
// <https://tc39.es/ecma262/2024/multipage/ecmascript-language-functions-and-classes.html#sec-class-definitions-static-semantics-early-errors>
Expand Down
7 changes: 0 additions & 7 deletions crates/oxc_parser/src/diagnostics.rs
Original file line number Diff line number Diff line change
Expand Up @@ -463,13 +463,6 @@ pub fn using_declarations_must_be_initialized(span: Span) -> OxcDiagnostic {
OxcDiagnostic::error("Using declarations must have an initializer.").with_label(span)
}

/// TS(1093)
#[cold]
pub fn static_constructor(span: Span) -> OxcDiagnostic {
ts_error("1089", "`static` modifier cannot appear on a constructor declaration.")
.with_label(span)
}

#[cold]
pub fn jsx_element_no_match(span: Span, span1: Span, name: &str) -> OxcDiagnostic {
OxcDiagnostic::error(format!("Expected corresponding JSX closing tag for '{name}'."))
Expand Down
Loading
Loading