Skip to content
Closed
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
4 changes: 0 additions & 4 deletions src/compiler/checker.ts
Original file line number Diff line number Diff line change
Expand Up @@ -51414,10 +51414,6 @@ export function createTypeChecker(host: TypeCheckerHost): TypeChecker {
return grammarErrorOnNode(modifier, Diagnostics._0_modifier_must_precede_1_modifier, "abstract", "accessor");
}
}
if (isNamedDeclaration(node) && node.name.kind === SyntaxKind.PrivateIdentifier) {
return grammarErrorOnNode(modifier, Diagnostics._0_modifier_cannot_be_used_with_a_private_identifier, "abstract");
}

flags |= ModifierFlags.Abstract;
break;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,12 +20,11 @@ privateNamesIncompatibleModifiers.ts(25,5): error TS1031: 'declare' modifier can
privateNamesIncompatibleModifiers.ts(26,5): error TS1031: 'declare' modifier cannot appear on class elements of this kind.
privateNamesIncompatibleModifiers.ts(27,5): error TS1042: 'async' modifier cannot be used here.
privateNamesIncompatibleModifiers.ts(28,5): error TS1042: 'async' modifier cannot be used here.
privateNamesIncompatibleModifiers.ts(32,5): error TS18019: 'abstract' modifier cannot be used with a private identifier.
privateNamesIncompatibleModifiers.ts(32,14): error TS1267: Property '#quux' cannot have an initializer because it is marked abstract.


!!! error TS2318: Cannot find global type 'AsyncIterableIterator'.
==== privateNamesIncompatibleModifiers.ts (23 errors) ====
==== privateNamesIncompatibleModifiers.ts (22 errors) ====
class A {
public #foo = 3; // Error
~~~~~~
Expand Down Expand Up @@ -100,8 +99,6 @@ privateNamesIncompatibleModifiers.ts(32,14): error TS1267: Property '#quux' cann

abstract class B {
abstract #quux = 3; // Error
~~~~~~~~
!!! error TS18019: 'abstract' modifier cannot be used with a private identifier.
~~~~~
!!! error TS1267: Property '#quux' cannot have an initializer because it is marked abstract.
}
Expand Down