Accept baselines

This commit is contained in:
Tingan Ho 2017-08-01 22:23:34 +02:00
parent 81fb3f702a
commit dbdbb05c66
4 changed files with 4 additions and 21 deletions

View file

@ -441,7 +441,7 @@ var BasicFeatures = (function () {
var xx = c;
retVal += ;
try { }
catch (_ignoredCatchParameter) { }
catch (_a) { }
Property;
retVal += c.Member();
retVal += xx.Foo() ? 0 : 1;

View file

@ -1,10 +1,9 @@
tests/cases/conformance/statements/tryStatements/invalidTryStatements.ts(8,23): error TS1196: Catch clause variable cannot have a type annotation.
tests/cases/conformance/statements/tryStatements/invalidTryStatements.ts(9,23): error TS1196: Catch clause variable cannot have a type annotation.
tests/cases/conformance/statements/tryStatements/invalidTryStatements.ts(10,23): error TS1196: Catch clause variable cannot have a type annotation.
tests/cases/conformance/statements/tryStatements/invalidTryStatements.ts(14,13): error TS2714: Duplicate identifier '_ignoredCatchParameter'. Compiler uses the parameter declaration '_ignoredCatchParameter' to bind ignored catched exceptions.
==== tests/cases/conformance/statements/tryStatements/invalidTryStatements.ts (4 errors) ====
==== tests/cases/conformance/statements/tryStatements/invalidTryStatements.ts (3 errors) ====
function fn() {
try {
} catch (x) {
@ -21,13 +20,6 @@ tests/cases/conformance/statements/tryStatements/invalidTryStatements.ts(14,13):
try { } catch (y: string) { }
~~~~~~
!!! error TS1196: Catch clause variable cannot have a type annotation.
try { } catch {
let _ignoredCatchParameter; // Should error since we downlevel emit this variable.
~~~~~~~~~~~~~~~~~~~~~~
!!! error TS2714: Duplicate identifier '_ignoredCatchParameter'. Compiler uses the parameter declaration '_ignoredCatchParameter' to bind ignored catched exceptions.
}
}

View file

@ -9,11 +9,6 @@ function fn() {
try { } catch (z: any) { }
try { } catch (a: number) { }
try { } catch (y: string) { }
try { } catch {
let _ignoredCatchParameter; // Should error since we downlevel emit this variable.
}
}
@ -32,8 +27,4 @@ function fn() {
catch (a) { }
try { }
catch (y) { }
try { }
catch (_ignoredCatchParameter) {
var _ignoredCatchParameter = void 0; // Should error since we downlevel emit this variable.
}
}

View file

@ -14,7 +14,7 @@ function fn() {
//// [tryStatements.js]
function fn() {
try { }
catch (_ignoredCatchParameter) { }
catch (_a) { }
try { }
catch (x) {
var x;
@ -22,7 +22,7 @@ function fn() {
try { }
finally { }
try { }
catch (_ignoredCatchParameter) { }
catch (_b) { }
finally { }
try { }
catch (z) { }