Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix typo in 'now->not allowed' #6228

Merged
merged 1 commit into from
Oct 21, 2022
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.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -1,54 +1,54 @@
//// [privateNameAndPropertySignature.ts]
//!
//! x private names are now allowed in interface
//! x private names are not allowed in interface
//! ,----
//! 2 | #foo: string;
//! : ^^^^
//! `----
//!
//! x private names are now allowed in interface
//! x private names are not allowed in interface
//! ,----
//! 3 | #bar(): string;
//! : ^^^^
//! `----
//!
//! x private names are now allowed in interface
//! x private names are not allowed in interface
//! ,----
//! 7 | #foo: string;
//! : ^^^^
//! `----
//!
//! x private names are now allowed in interface
//! x private names are not allowed in interface
//! ,----
//! 8 | #bar(): string;
//! : ^^^^
//! `----
//!
//! x private names are now allowed in interface
//! x private names are not allowed in interface
//! ,----
//! 12 | #foo: number;
//! : ^^^^
//! `----
//!
//! x private names are now allowed in interface
//! x private names are not allowed in interface
//! ,----
//! 14 | #baz: string;
//! : ^^^^
//! `----
//!
//! x private names are now allowed in interface
//! x private names are not allowed in interface
//! ,----
//! 15 | #taz(): string;
//! : ^^^^
//! `----
//!
//! x private names are now allowed in interface
//! x private names are not allowed in interface
//! ,----
//! 17 | #baz(): string;
//! : ^^^^
//! `----
//!
//! x private names are now allowed in interface
//! x private names are not allowed in interface
//! ,----
//! 20 | declare const y: [{ qux: { #quux: 3 } }];
//! : ^^^^^
Expand Down
Original file line number Diff line number Diff line change
@@ -1,54 +1,54 @@
//// [privateNameAndPropertySignature.ts]
//!
//! x private names are now allowed in interface
//! x private names are not allowed in interface
//! ,----
//! 2 | #foo: string;
//! : ^^^^
//! `----
//!
//! x private names are now allowed in interface
//! x private names are not allowed in interface
//! ,----
//! 3 | #bar(): string;
//! : ^^^^
//! `----
//!
//! x private names are now allowed in interface
//! x private names are not allowed in interface
//! ,----
//! 7 | #foo: string;
//! : ^^^^
//! `----
//!
//! x private names are now allowed in interface
//! x private names are not allowed in interface
//! ,----
//! 8 | #bar(): string;
//! : ^^^^
//! `----
//!
//! x private names are now allowed in interface
//! x private names are not allowed in interface
//! ,----
//! 12 | #foo: number;
//! : ^^^^
//! `----
//!
//! x private names are now allowed in interface
//! x private names are not allowed in interface
//! ,----
//! 14 | #baz: string;
//! : ^^^^
//! `----
//!
//! x private names are now allowed in interface
//! x private names are not allowed in interface
//! ,----
//! 15 | #taz(): string;
//! : ^^^^
//! `----
//!
//! x private names are now allowed in interface
//! x private names are not allowed in interface
//! ,----
//! 17 | #baz(): string;
//! : ^^^^
//! `----
//!
//! x private names are now allowed in interface
//! x private names are not allowed in interface
//! ,----
//! 20 | declare const y: [{ qux: { #quux: 3 } }];
//! : ^^^^^
Expand Down
4 changes: 2 additions & 2 deletions crates/swc_ecma_parser/src/error.rs
Original file line number Diff line number Diff line change
Expand Up @@ -280,7 +280,7 @@ impl SyntaxError {
pub fn msg(&self) -> Cow<'static, str> {
match self {
SyntaxError::PrivateNameInInterface => {
"private names are now allowed in interface".into()
"private names are not allowed in interface".into()
}
SyntaxError::TopLevelAwait => "top level await requires target to es2017 or higher \
and topLevelAwait:true for ecmascript"
Expand Down Expand Up @@ -512,7 +512,7 @@ impl SyntaxError {
SyntaxError::TS2703 => {
"The operand of a delete operator must be a property reference.".into()
}
SyntaxError::DeclNotAllowed => "Declaration is now allowed".into(),
SyntaxError::DeclNotAllowed => "Declaration is not allowed".into(),
SyntaxError::InvalidSuperCall => "Invalid `super()`".into(),
SyntaxError::InvalidSuper => "Invalid access to super".into(),
SyntaxError::InvalidSuperPrivateName => {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@

x Declaration is now allowed
x Declaration is not allowed
,-[$DIR/tests/test262-parser/fail/665ab370012f20cf.js:1:1]
1 | with(true) function a(){}
: ^^^^^^^^
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@

x Declaration is now allowed
x Declaration is not allowed
,-[$DIR/tests/test262-parser/fail/6cd36f7e68bdfb7a.js:1:1]
1 | for(;;) function a(){}
: ^^^^^^^^
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@

x Declaration is now allowed
x Declaration is not allowed
,-[$DIR/tests/test262-parser/fail/971cf622ebaef28e.js:1:1]
1 | with(true) class a {}
: ^^^^^
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@

x Declaration is now allowed
x Declaration is not allowed
,-[$DIR/tests/test262-parser/fail/c7ad2478fd72bffe.js:1:1]
1 | for(a in b) function c(){}
: ^^^^^^^^
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@

x Declaration is now allowed
x Declaration is not allowed
,-[$DIR/tests/test262-parser/fail/e808e347646c2670.js:1:1]
1 | for(a of b) function c(){}
: ^^^^^^^^
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@

x Declaration is now allowed
x Declaration is not allowed
,-[$DIR/tests/test262-parser/fail/efcb54b62e8f0e06.js:1:1]
1 | while (1) function foo(){}
: ^^^^^^^^
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@

x Declaration is now allowed
x Declaration is not allowed
,-[$DIR/tests/test262-parser/fail/f2db53245b89c72f.js:1:1]
1 | while(true) function a(){}
: ^^^^^^^^
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@

x private names are now allowed in interface
x private names are not allowed in interface
,-[$DIR/tests/typescript-errors/issue-1211-1/input.ts:2:5]
2 | #bar()
: ^^^^
Expand Down