mirror of
https://github.com/microsoft/TypeScript.git
synced 2026-03-15 14:05:47 -05:00
Removes valid test cases from invalid test case file
This commit is contained in:
@@ -1807,7 +1807,7 @@ namespace ts {
|
||||
|
||||
export interface CatchClause extends Node {
|
||||
kind: SyntaxKind.CatchClause;
|
||||
parent: TryStatement;
|
||||
parent?: TryStatement; // We parse missing try statements
|
||||
variableDeclaration?: VariableDeclaration;
|
||||
block: Block;
|
||||
}
|
||||
|
||||
@@ -1,16 +1,12 @@
|
||||
tests/cases/conformance/statements/tryStatements/invalidTryStatements2.ts(6,5): error TS1005: 'try' expected.
|
||||
tests/cases/conformance/statements/tryStatements/invalidTryStatements2.ts(12,5): error TS1005: 'try' expected.
|
||||
tests/cases/conformance/statements/tryStatements/invalidTryStatements2.ts(13,5): error TS1005: 'try' expected.
|
||||
tests/cases/conformance/statements/tryStatements/invalidTryStatements2.ts(2,5): error TS1005: 'try' expected.
|
||||
tests/cases/conformance/statements/tryStatements/invalidTryStatements2.ts(8,5): error TS1005: 'try' expected.
|
||||
tests/cases/conformance/statements/tryStatements/invalidTryStatements2.ts(9,5): error TS1005: 'try' expected.
|
||||
tests/cases/conformance/statements/tryStatements/invalidTryStatements2.ts(18,5): error TS1005: 'try' expected.
|
||||
tests/cases/conformance/statements/tryStatements/invalidTryStatements2.ts(22,5): error TS1005: 'try' expected.
|
||||
tests/cases/conformance/statements/tryStatements/invalidTryStatements2.ts(26,5): error TS1005: 'try' expected.
|
||||
|
||||
|
||||
==== tests/cases/conformance/statements/tryStatements/invalidTryStatements2.ts (5 errors) ====
|
||||
function fn() {
|
||||
try {
|
||||
} catch { // syntax error, missing '(x)'
|
||||
}
|
||||
|
||||
catch(x) { } // error missing try
|
||||
~~~~~
|
||||
!!! error TS1005: 'try' expected.
|
||||
|
||||
@@ -1,9 +1,5 @@
|
||||
//// [invalidTryStatements2.ts]
|
||||
function fn() {
|
||||
try {
|
||||
} catch { // syntax error, missing '(x)'
|
||||
}
|
||||
|
||||
catch(x) { } // error missing try
|
||||
|
||||
finally{ } // potential error; can be absorbed by the 'catch'
|
||||
@@ -30,10 +26,6 @@ function fn2() {
|
||||
|
||||
//// [invalidTryStatements2.js]
|
||||
function fn() {
|
||||
try {
|
||||
}
|
||||
catch (_ignoredCatchParameter) {
|
||||
}
|
||||
try {
|
||||
}
|
||||
catch (x) { } // error missing try
|
||||
|
||||
@@ -1,8 +1,4 @@
|
||||
function fn() {
|
||||
try {
|
||||
} catch { // syntax error, missing '(x)'
|
||||
}
|
||||
|
||||
catch(x) { } // error missing try
|
||||
|
||||
finally{ } // potential error; can be absorbed by the 'catch'
|
||||
|
||||
Reference in New Issue
Block a user