TypeScript/tests/baselines/reference/destructuringParameterDeclaration6.errors.txt
2015-05-04 11:18:25 -07:00

57 lines
2.8 KiB
Plaintext

tests/cases/conformance/es6/destructuring/destructuringParameterDeclaration6.ts(7,18): error TS1005: ':' expected.
tests/cases/conformance/es6/destructuring/destructuringParameterDeclaration6.ts(9,14): error TS1181: Array element destructuring pattern expected.
tests/cases/conformance/es6/destructuring/destructuringParameterDeclaration6.ts(9,19): error TS1005: '(' expected.
tests/cases/conformance/es6/destructuring/destructuringParameterDeclaration6.ts(9,21): error TS1109: Expression expected.
tests/cases/conformance/es6/destructuring/destructuringParameterDeclaration6.ts(9,24): error TS1005: '(' expected.
tests/cases/conformance/es6/destructuring/destructuringParameterDeclaration6.ts(9,26): error TS2304: Cannot find name 'public'.
tests/cases/conformance/es6/destructuring/destructuringParameterDeclaration6.ts(9,32): error TS1005: ';' expected.
tests/cases/conformance/es6/destructuring/destructuringParameterDeclaration6.ts(9,33): error TS1128: Declaration or statement expected.
tests/cases/conformance/es6/destructuring/destructuringParameterDeclaration6.ts(10,16): error TS1003: Identifier expected.
tests/cases/conformance/es6/destructuring/destructuringParameterDeclaration6.ts(10,21): error TS1005: '(' expected.
tests/cases/conformance/es6/destructuring/destructuringParameterDeclaration6.ts(12,13): error TS2370: A rest parameter must be of an array type.
==== tests/cases/conformance/es6/destructuring/destructuringParameterDeclaration6.ts (11 errors) ====
// A parameter declaration may specify either an identifier or a binding pattern.
// Reserved words are not allowed to be used as an identifier in parameter declaration
"use strict"
// Error
function a({while}) { }
~
!!! error TS1005: ':' expected.
function a1({public}) { }
function a4([while, for, public]){ }
~~~~~
!!! error TS1181: Array element destructuring pattern expected.
~
!!! error TS1005: '(' expected.
~~~
!!! error TS1109: Expression expected.
~
!!! error TS1005: '(' expected.
~~~~~~
!!! error TS2304: Cannot find name 'public'.
~
!!! error TS1005: ';' expected.
~
!!! error TS1128: Declaration or statement expected.
function a5(...while) { }
~~~~~
!!! error TS1003: Identifier expected.
~
!!! error TS1005: '(' expected.
function a6(...public) { }
function a7(...a: string) { }
~~~~~~~~~~~~
!!! error TS2370: A rest parameter must be of an array type.
a({ while: 1 });
// No Error
function b1({public: x}) { }
function b2({while: y}) { }
b1({ public: 1 });
b2({ while: 1 });