Fix up for 'async'

This commit is contained in:
Ryan Cavanaugh
2015-12-08 10:57:33 -08:00
parent 92d7d1c953
commit 964fbea9c1
5 changed files with 28 additions and 14 deletions

View File

@@ -1,23 +1,23 @@
tests/cases/compiler/modifiersInObjectLiterals.ts(2,2): error TS1184: Modifiers cannot appear here.
tests/cases/compiler/modifiersInObjectLiterals.ts(3,2): error TS1184: Modifiers cannot appear here.
tests/cases/compiler/modifiersInObjectLiterals.ts(4,2): error TS1184: Modifiers cannot appear here.
tests/cases/compiler/modifiersInObjectLiterals.ts(5,2): error TS1184: Modifiers cannot appear here.
tests/cases/compiler/modifiersInObjectLiterals.ts(2,2): error TS1042: 'public' modifier cannot be used here.
tests/cases/compiler/modifiersInObjectLiterals.ts(3,2): error TS1042: 'private' modifier cannot be used here.
tests/cases/compiler/modifiersInObjectLiterals.ts(4,2): error TS1042: 'protected' modifier cannot be used here.
tests/cases/compiler/modifiersInObjectLiterals.ts(5,2): error TS1042: 'abstract' modifier cannot be used here.
==== tests/cases/compiler/modifiersInObjectLiterals.ts (4 errors) ====
let data = {
public foo: 'hey',
~~~~~~
!!! error TS1184: Modifiers cannot appear here.
!!! error TS1042: 'public' modifier cannot be used here.
private bar: 'nay',
~~~~~~~
!!! error TS1184: Modifiers cannot appear here.
!!! error TS1042: 'private' modifier cannot be used here.
protected baz: 'oh my',
~~~~~~~~~
!!! error TS1184: Modifiers cannot appear here.
!!! error TS1042: 'protected' modifier cannot be used here.
abstract noWay: 'yes'
~~~~~~~~
!!! error TS1184: Modifiers cannot appear here.
!!! error TS1042: 'abstract' modifier cannot be used here.
};
data.foo + data.bar + data.baz + data.noWay

View File

@@ -1,7 +1,10 @@
tests/cases/compiler/objectLiteralMemberWithModifiers1.ts(1,11): error TS1042: 'public' modifier cannot be used here.
tests/cases/compiler/objectLiteralMemberWithModifiers1.ts(1,11): error TS1184: Modifiers cannot appear here.
==== tests/cases/compiler/objectLiteralMemberWithModifiers1.ts (1 errors) ====
==== tests/cases/compiler/objectLiteralMemberWithModifiers1.ts (2 errors) ====
var v = { public foo() { } }
~~~~~~
!!! error TS1042: 'public' modifier cannot be used here.
~~~~~~
!!! error TS1184: Modifiers cannot appear here.

View File

@@ -1,9 +1,12 @@
tests/cases/compiler/objectLiteralMemberWithModifiers2.ts(1,11): error TS1042: 'public' modifier cannot be used here.
tests/cases/compiler/objectLiteralMemberWithModifiers2.ts(1,22): error TS1056: Accessors are only available when targeting ECMAScript 5 and higher.
tests/cases/compiler/objectLiteralMemberWithModifiers2.ts(1,22): error TS2378: A 'get' accessor must return a value.
==== tests/cases/compiler/objectLiteralMemberWithModifiers2.ts (2 errors) ====
==== tests/cases/compiler/objectLiteralMemberWithModifiers2.ts (3 errors) ====
var v = { public get foo() { } }
~~~~~~
!!! error TS1042: 'public' modifier cannot be used here.
~~~
!!! error TS1056: Accessors are only available when targeting ECMAScript 5 and higher.
~~~

View File

@@ -1,9 +1,12 @@
tests/cases/conformance/parser/ecmascript5/Accessors/parserAccessors10.ts(2,3): error TS1042: 'public' modifier cannot be used here.
tests/cases/conformance/parser/ecmascript5/Accessors/parserAccessors10.ts(2,14): error TS2378: A 'get' accessor must return a value.
==== tests/cases/conformance/parser/ecmascript5/Accessors/parserAccessors10.ts (1 errors) ====
==== tests/cases/conformance/parser/ecmascript5/Accessors/parserAccessors10.ts (2 errors) ====
var v = {
public get foo() { }
~~~~~~
!!! error TS1042: 'public' modifier cannot be used here.
~~~
!!! error TS2378: A 'get' accessor must return a value.
};