forked from microsoft/TypeScript
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fixes microsoft#10117 The fix was easy, but then I had to get the tests passing: ```shell $ gulp runtests # loads of failures, more than 1000 actually. $ gulp baseline-accept $ gulp runtests # to make sure they now passed ``` ...and then `git add .` to add all the changes. (There were a bunch of new files created when I did it like this; is that correct?) ---- (Regarding the unrelated changes in `compileOnSave.ts`: I happened to see a few typing mistakes there very close to the changes I were making to that files, so I bundled that change along at the same time. Since the tests are passing I think it should be fine.)
- Loading branch information
Showing
1,438 changed files
with
9,533 additions
and
4,804 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
=== tests/cases/conformance/statements/for-ofStatements/ES3For-ofTypeCheck1.ts === | ||
for (var v of "") { } | ||
>v : Symbol(v, Decl(ES3For-ofTypeCheck1.ts, 0, 8)) | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
=== tests/cases/conformance/statements/for-ofStatements/ES3For-ofTypeCheck1.ts === | ||
for (var v of "") { } | ||
>v : string | ||
>"" : "" | ||
|
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
=== tests/cases/conformance/statements/for-ofStatements/ES3For-ofTypeCheck4.ts === | ||
var union: string | string[]; | ||
>union : Symbol(union, Decl(ES3For-ofTypeCheck4.ts, 0, 3)) | ||
|
||
for (const v of union) { } | ||
>v : Symbol(v, Decl(ES3For-ofTypeCheck4.ts, 1, 10)) | ||
>union : Symbol(union, Decl(ES3For-ofTypeCheck4.ts, 0, 3)) | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
=== tests/cases/conformance/statements/for-ofStatements/ES3For-ofTypeCheck4.ts === | ||
var union: string | string[]; | ||
>union : string | string[] | ||
|
||
for (const v of union) { } | ||
>v : string | ||
>union : string | string[] | ||
|
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
5 changes: 1 addition & 4 deletions
5
tests/baselines/reference/MemberAccessorDeclaration15.errors.txt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,12 +1,9 @@ | ||
tests/cases/compiler/MemberAccessorDeclaration15.ts(2,8): error TS1056: Accessors are only available when targeting ECMAScript 5 and higher. | ||
tests/cases/compiler/MemberAccessorDeclaration15.ts(2,12): error TS2369: A parameter property is only allowed in a constructor implementation. | ||
|
||
|
||
==== tests/cases/compiler/MemberAccessorDeclaration15.ts (2 errors) ==== | ||
==== tests/cases/compiler/MemberAccessorDeclaration15.ts (1 errors) ==== | ||
class C { | ||
set Foo(public a: number) { } | ||
~~~ | ||
!!! error TS1056: Accessors are only available when targeting ECMAScript 5 and higher. | ||
~~~~~~~~~~~~~~~~ | ||
!!! error TS2369: A parameter property is only allowed in a constructor implementation. | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,36 @@ | ||
=== tests/cases/conformance/classes/propertyMemberDeclarations/memberAccessorDeclarations/accessorWithES3.ts === | ||
// error to use accessors in ES3 mode | ||
|
||
class C { | ||
>C : Symbol(C, Decl(accessorWithES3.ts, 0, 0)) | ||
|
||
get x() { | ||
>x : Symbol(C.x, Decl(accessorWithES3.ts, 2, 9)) | ||
|
||
return 1; | ||
} | ||
} | ||
|
||
class D { | ||
>D : Symbol(D, Decl(accessorWithES3.ts, 6, 1)) | ||
|
||
set x(v) { | ||
>x : Symbol(D.x, Decl(accessorWithES3.ts, 8, 9)) | ||
>v : Symbol(v, Decl(accessorWithES3.ts, 9, 10)) | ||
} | ||
} | ||
|
||
var x = { | ||
>x : Symbol(x, Decl(accessorWithES3.ts, 13, 3)) | ||
|
||
get a() { return 1 } | ||
>a : Symbol(a, Decl(accessorWithES3.ts, 13, 9)) | ||
} | ||
|
||
var y = { | ||
>y : Symbol(y, Decl(accessorWithES3.ts, 17, 3)) | ||
|
||
set b(v) { } | ||
>b : Symbol(b, Decl(accessorWithES3.ts, 17, 9)) | ||
>v : Symbol(v, Decl(accessorWithES3.ts, 18, 10)) | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,40 @@ | ||
=== tests/cases/conformance/classes/propertyMemberDeclarations/memberAccessorDeclarations/accessorWithES3.ts === | ||
// error to use accessors in ES3 mode | ||
|
||
class C { | ||
>C : C | ||
|
||
get x() { | ||
>x : number | ||
|
||
return 1; | ||
>1 : 1 | ||
} | ||
} | ||
|
||
class D { | ||
>D : D | ||
|
||
set x(v) { | ||
>x : any | ||
>v : any | ||
} | ||
} | ||
|
||
var x = { | ||
>x : { readonly a: number; } | ||
>{ get a() { return 1 }} : { readonly a: number; } | ||
|
||
get a() { return 1 } | ||
>a : number | ||
>1 : 1 | ||
} | ||
|
||
var y = { | ||
>y : { b: any; } | ||
>{ set b(v) { }} : { b: any; } | ||
|
||
set b(v) { } | ||
>b : any | ||
>v : any | ||
} |
22 changes: 0 additions & 22 deletions
22
tests/baselines/reference/accessorsAreNotContextuallyTyped.errors.txt
This file was deleted.
Oops, something went wrong.
Oops, something went wrong.