mirror of
https://github.com/microsoft/TypeScript.git
synced 2025-11-18 17:21:48 +00:00
Accept baselines
This commit is contained in:
@@ -34,7 +34,7 @@ tests/cases/compiler/constructorWithIncompleteTypeAnnotation.ts(138,13): error T
|
||||
tests/cases/compiler/constructorWithIncompleteTypeAnnotation.ts(141,32): error TS1005: '{' expected.
|
||||
tests/cases/compiler/constructorWithIncompleteTypeAnnotation.ts(143,13): error TS1005: 'try' expected.
|
||||
tests/cases/compiler/constructorWithIncompleteTypeAnnotation.ts(159,24): error TS1109: Expression expected.
|
||||
tests/cases/compiler/constructorWithIncompleteTypeAnnotation.ts(159,30): error TS1005: '(' expected.
|
||||
tests/cases/compiler/constructorWithIncompleteTypeAnnotation.ts(159,30): error TS1005: '{' expected.
|
||||
tests/cases/compiler/constructorWithIncompleteTypeAnnotation.ts(159,31): error TS2304: Cannot find name 'Property'.
|
||||
tests/cases/compiler/constructorWithIncompleteTypeAnnotation.ts(166,13): error TS2365: Operator '+=' cannot be applied to types 'number' and 'void'.
|
||||
tests/cases/compiler/constructorWithIncompleteTypeAnnotation.ts(180,40): error TS2447: The '^' operator is not allowed for boolean types. Consider using '!==' instead.
|
||||
@@ -323,7 +323,7 @@ tests/cases/compiler/constructorWithIncompleteTypeAnnotation.ts(261,1): error TS
|
||||
~~~~~
|
||||
!!! error TS1109: Expression expected.
|
||||
~
|
||||
!!! error TS1005: '(' expected.
|
||||
!!! error TS1005: '{' expected.
|
||||
~~~~~~~~
|
||||
!!! error TS2304: Cannot find name 'Property'.
|
||||
retVal += c.Member();
|
||||
|
||||
@@ -441,7 +441,7 @@ var BasicFeatures = (function () {
|
||||
var xx = c;
|
||||
retVal += ;
|
||||
try { }
|
||||
catch () { }
|
||||
catch (_ignoredCatchParameter) { }
|
||||
Property;
|
||||
retVal += c.Member();
|
||||
retVal += xx.Foo() ? 0 : 1;
|
||||
|
||||
@@ -0,0 +1,11 @@
|
||||
//// [emitter.ignoredCatchParameter.esnext.ts]
|
||||
function fn() {
|
||||
try {} catch {}
|
||||
}
|
||||
|
||||
|
||||
//// [emitter.ignoredCatchParameter.esnext.js]
|
||||
function fn() {
|
||||
try { }
|
||||
catch { }
|
||||
}
|
||||
@@ -0,0 +1,7 @@
|
||||
=== tests/cases/conformance/emitter/esnext/noCatchParameter/emitter.ignoredCatchParameter.esnext.ts ===
|
||||
function fn() {
|
||||
>fn : Symbol(fn, Decl(emitter.ignoredCatchParameter.esnext.ts, 0, 0))
|
||||
|
||||
try {} catch {}
|
||||
}
|
||||
|
||||
@@ -0,0 +1,7 @@
|
||||
=== tests/cases/conformance/emitter/esnext/noCatchParameter/emitter.ignoredCatchParameter.esnext.ts ===
|
||||
function fn() {
|
||||
>fn : () => void
|
||||
|
||||
try {} catch {}
|
||||
}
|
||||
|
||||
@@ -1,9 +1,10 @@
|
||||
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 (3 errors) ====
|
||||
==== tests/cases/conformance/statements/tryStatements/invalidTryStatements.ts (4 errors) ====
|
||||
function fn() {
|
||||
try {
|
||||
} catch (x) {
|
||||
@@ -20,6 +21,13 @@ tests/cases/conformance/statements/tryStatements/invalidTryStatements.ts(10,23):
|
||||
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.
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -9,6 +9,11 @@ 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.
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -27,4 +32,8 @@ function fn() {
|
||||
catch (a) { }
|
||||
try { }
|
||||
catch (y) { }
|
||||
try { }
|
||||
catch (_ignoredCatchParameter) {
|
||||
var _ignoredCatchParameter = void 0; // Should error since we downlevel emit this variable.
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,4 +1,3 @@
|
||||
tests/cases/conformance/statements/tryStatements/invalidTryStatements2.ts(3,13): error TS1005: '(' expected.
|
||||
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.
|
||||
@@ -6,12 +5,10 @@ tests/cases/conformance/statements/tryStatements/invalidTryStatements2.ts(22,5):
|
||||
tests/cases/conformance/statements/tryStatements/invalidTryStatements2.ts(26,5): error TS1005: 'try' expected.
|
||||
|
||||
|
||||
==== tests/cases/conformance/statements/tryStatements/invalidTryStatements2.ts (6 errors) ====
|
||||
==== tests/cases/conformance/statements/tryStatements/invalidTryStatements2.ts (5 errors) ====
|
||||
function fn() {
|
||||
try {
|
||||
} catch { // syntax error, missing '(x)'
|
||||
~
|
||||
!!! error TS1005: '(' expected.
|
||||
}
|
||||
|
||||
catch(x) { } // error missing try
|
||||
|
||||
@@ -32,7 +32,7 @@ function fn2() {
|
||||
function fn() {
|
||||
try {
|
||||
}
|
||||
catch () {
|
||||
catch (_ignoredCatchParameter) {
|
||||
}
|
||||
try {
|
||||
}
|
||||
|
||||
@@ -1,20 +1,19 @@
|
||||
//// [tryStatements.ts]
|
||||
function fn() {
|
||||
try {
|
||||
try { } catch { }
|
||||
|
||||
} catch (x) {
|
||||
var x: any;
|
||||
}
|
||||
try { } catch (x) { var x: any; }
|
||||
|
||||
try { } finally { }
|
||||
|
||||
try { }catch(z){ } finally { }
|
||||
try { } catch(z) { } finally { }
|
||||
}
|
||||
|
||||
//// [tryStatements.js]
|
||||
function fn() {
|
||||
try {
|
||||
}
|
||||
try { }
|
||||
catch (_ignoredCatchParameter) { }
|
||||
try { }
|
||||
catch (x) {
|
||||
var x;
|
||||
}
|
||||
|
||||
@@ -2,17 +2,14 @@
|
||||
function fn() {
|
||||
>fn : Symbol(fn, Decl(tryStatements.ts, 0, 0))
|
||||
|
||||
try {
|
||||
try { } catch { }
|
||||
|
||||
} catch (x) {
|
||||
>x : Symbol(x, Decl(tryStatements.ts, 3, 13))
|
||||
|
||||
var x: any;
|
||||
>x : Symbol(x, Decl(tryStatements.ts, 4, 11))
|
||||
}
|
||||
try { } catch (x) { var x: any; }
|
||||
>x : Symbol(x, Decl(tryStatements.ts, 3, 19))
|
||||
>x : Symbol(x, Decl(tryStatements.ts, 3, 27))
|
||||
|
||||
try { } finally { }
|
||||
|
||||
try { }catch(z){ } finally { }
|
||||
>z : Symbol(z, Decl(tryStatements.ts, 9, 17))
|
||||
try { } catch(z) { } finally { }
|
||||
>z : Symbol(z, Decl(tryStatements.ts, 7, 18))
|
||||
}
|
||||
|
||||
@@ -2,17 +2,14 @@
|
||||
function fn() {
|
||||
>fn : () => void
|
||||
|
||||
try {
|
||||
try { } catch { }
|
||||
|
||||
} catch (x) {
|
||||
try { } catch (x) { var x: any; }
|
||||
>x : any
|
||||
|
||||
var x: any;
|
||||
>x : any
|
||||
}
|
||||
|
||||
try { } finally { }
|
||||
|
||||
try { }catch(z){ } finally { }
|
||||
try { } catch(z) { } finally { }
|
||||
>z : any
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user