Skip to content

Commit 7b7f497

Browse files
Adding test.
1 parent 27e8882 commit 7b7f497

File tree

3 files changed

+25
-0
lines changed

3 files changed

+25
-0
lines changed
Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
tests/cases/compiler/catchClauseWithBindingPattern1.ts(3,8): error TS1195: Catch clause variable name must be an identifier.
2+
3+
4+
==== tests/cases/compiler/catchClauseWithBindingPattern1.ts (1 errors) ====
5+
try {
6+
}
7+
catch ({a}) {
8+
~
9+
!!! error TS1195: Catch clause variable name must be an identifier.
10+
}
Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
//// [catchClauseWithBindingPattern1.ts]
2+
try {
3+
}
4+
catch ({a}) {
5+
}
6+
7+
//// [catchClauseWithBindingPattern1.js]
8+
try {
9+
}
10+
catch (a = (void 0).a) {
11+
}
Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
try {
2+
}
3+
catch ({a}) {
4+
}

0 commit comments

Comments
 (0)