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_semantic/src/checker/typescript.rs
Original file line number Diff line number Diff line change
Expand Up @@ -389,7 +389,6 @@ pub fn check_method_definition<'a>(method: &MethodDefinition<'a>, ctx: &Semantic
// have abstract modifiers, but this gets checked during parsing
MethodDefinitionKind::Constructor => {}
}
ctx.error(abstract_method_cannot_have_implementation(method_name, span));
}
}

Expand Down
40 changes: 0 additions & 40 deletions tasks/coverage/snapshots/parser_babel.snap
Original file line number Diff line number Diff line change
Expand Up @@ -12388,22 +12388,6 @@ Expect to Parse: tasks/coverage/babel/packages/babel-parser/test/fixtures/typesc
3 │ }
╰────

× TS(1245): Method 'method' cannot have an implementation because it is marked abstract.
╭─[babel/packages/babel-parser/test/fixtures/typescript/class/abstract-method-with-body/input.ts:2:12]
1 │ abstract class Foo {
2 │ abstract method() {}
· ──────
3 │ }
╰────

× TS(1245): Method 'foo()' cannot have an implementation because it is marked abstract.
╭─[babel/packages/babel-parser/test/fixtures/typescript/class/abstract-method-with-body-computed/input.ts:2:13]
1 │ abstract class Foo {
2 │ abstract [foo()]() {}
· ─────
3 │ }
╰────

× TS(1245): Method 'foo()' cannot have an implementation because it is marked abstract.
╭─[babel/packages/babel-parser/test/fixtures/typescript/class/abstract-method-with-body-computed/input.ts:2:13]
1 │ abstract class Foo {
Expand Down Expand Up @@ -12665,14 +12649,6 @@ Expect to Parse: tasks/coverage/babel/packages/babel-parser/test/fixtures/typesc
× TS(1245): Method 'd' cannot have an implementation because it is marked abstract.
╭─[babel/packages/babel-parser/test/fixtures/typescript/class/generator-method-with-modifiers/input.ts:5:13]
4 │ static *c() {}
5 │ abstract *d() {}
· ─
6 │ readonly *e() {}
╰────

× TS(1245): Method 'd' cannot have an implementation because it is marked abstract.
╭─[babel/packages/babel-parser/test/fixtures/typescript/class/generator-method-with-modifiers/input.ts:5:13]
4 │ static *c() {}
5 │ abstract *d() {}
· ─
6 │ readonly *e() {}
Expand Down Expand Up @@ -12825,14 +12801,6 @@ Expect to Parse: tasks/coverage/babel/packages/babel-parser/test/fixtures/typesc
× TS(1245): Method 'd' cannot have an implementation because it is marked abstract.
╭─[babel/packages/babel-parser/test/fixtures/typescript/class/optional-generator-method-with-invalid-modifiers/input.ts:2:13]
1 │ class C {
2 │ abstract *d?() { }
· ─
3 │ readonly *e?() { }
╰────

× TS(1245): Method 'd' cannot have an implementation because it is marked abstract.
╭─[babel/packages/babel-parser/test/fixtures/typescript/class/optional-generator-method-with-invalid-modifiers/input.ts:2:13]
1 │ class C {
2 │ abstract *d?() { }
· ─
3 │ readonly *e?() { }
Expand All @@ -12849,14 +12817,6 @@ Expect to Parse: tasks/coverage/babel/packages/babel-parser/test/fixtures/typesc
× TS(1245): Method 'd?.d' cannot have an implementation because it is marked abstract.
╭─[babel/packages/babel-parser/test/fixtures/typescript/class/optional-generator-method-with-invalid-modifiers/input.ts:8:14]
7 │ class A {
8 │ abstract *[d?.d]?() { }
· ────
9 │ readonly *[e?.e]?() { }
╰────

× TS(1245): Method 'd?.d' cannot have an implementation because it is marked abstract.
╭─[babel/packages/babel-parser/test/fixtures/typescript/class/optional-generator-method-with-invalid-modifiers/input.ts:8:14]
7 │ class A {
8 │ abstract *[d?.d]?() { }
· ────
9 │ readonly *[e?.e]?() { }
Expand Down
32 changes: 0 additions & 32 deletions tasks/coverage/snapshots/parser_typescript.snap
Original file line number Diff line number Diff line change
Expand Up @@ -14528,14 +14528,6 @@ Expect to Parse: tasks/coverage/typescript/tests/cases/conformance/parser/ecmasc
× TS(1318): Accessor 'aa' cannot have an implementation because it is marked abstract.
╭─[typescript/tests/cases/conformance/classes/classDeclarations/classAbstractKeyword/classAbstractAccessor.ts:3:17]
2 │ abstract get a();
3 │ abstract get aa() { return 1; } // error
· ──
4 │ abstract set b(x: string);
╰────

× TS(1245): Method 'aa' cannot have an implementation because it is marked abstract.
╭─[typescript/tests/cases/conformance/classes/classDeclarations/classAbstractKeyword/classAbstractAccessor.ts:3:17]
2 │ abstract get a();
3 │ abstract get aa() { return 1; } // error
· ──
4 │ abstract set b(x: string);
Expand All @@ -14544,14 +14536,6 @@ Expect to Parse: tasks/coverage/typescript/tests/cases/conformance/parser/ecmasc
× TS(1318): Accessor 'bb' cannot have an implementation because it is marked abstract.
╭─[typescript/tests/cases/conformance/classes/classDeclarations/classAbstractKeyword/classAbstractAccessor.ts:5:17]
4 │ abstract set b(x: string);
5 │ abstract set bb(x: string) {} // error
· ──
6 │ }
╰────

× TS(1245): Method 'bb' cannot have an implementation because it is marked abstract.
╭─[typescript/tests/cases/conformance/classes/classDeclarations/classAbstractKeyword/classAbstractAccessor.ts:5:17]
4 │ abstract set b(x: string);
5 │ abstract set bb(x: string) {} // error
· ──
6 │ }
Expand Down Expand Up @@ -14664,14 +14648,6 @@ Expect to Parse: tasks/coverage/typescript/tests/cases/conformance/parser/ecmasc
× TS(1245): Method 'foo' cannot have an implementation because it is marked abstract.
╭─[typescript/tests/cases/conformance/classes/classDeclarations/classAbstractKeyword/classAbstractMethodInNonAbstractClass.ts:6:14]
5 │ class B {
6 │ abstract foo() {}
· ───
7 │ }
╰────

× TS(1245): Method 'foo' cannot have an implementation because it is marked abstract.
╭─[typescript/tests/cases/conformance/classes/classDeclarations/classAbstractKeyword/classAbstractMethodInNonAbstractClass.ts:6:14]
5 │ class B {
6 │ abstract foo() {}
· ───
7 │ }
Expand All @@ -14688,14 +14664,6 @@ Expect to Parse: tasks/coverage/typescript/tests/cases/conformance/parser/ecmasc
× TS(1245): Method 'foo' cannot have an implementation because it is marked abstract.
╭─[typescript/tests/cases/conformance/classes/classDeclarations/classAbstractKeyword/classAbstractMethodWithImplementation.ts:2:14]
1 │ abstract class A {
2 │ abstract foo() {}
· ───
3 │ }
╰────

× TS(1245): Method 'foo' cannot have an implementation because it is marked abstract.
╭─[typescript/tests/cases/conformance/classes/classDeclarations/classAbstractKeyword/classAbstractMethodWithImplementation.ts:2:14]
1 │ abstract class A {
2 │ abstract foo() {}
· ───
3 │ }
Expand Down
Loading