-
Notifications
You must be signed in to change notification settings - Fork 12.6k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #3516 from Microsoft/extendsExpressions
Allow expressions in class extends clauses
- Loading branch information
Showing
132 changed files
with
1,348 additions
and
550 deletions.
There are no files selected for viewing
Large diffs are not rendered by default.
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
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 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 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
40 changes: 0 additions & 40 deletions
40
tests/baselines/reference/checkForObjectTooStrict.errors.txt
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,42 @@ | ||
=== tests/cases/compiler/checkForObjectTooStrict.ts === | ||
module Foo { | ||
>Foo : Symbol(Foo, Decl(checkForObjectTooStrict.ts, 0, 0)) | ||
|
||
export class Object { | ||
>Object : Symbol(Object, Decl(checkForObjectTooStrict.ts, 0, 12)) | ||
|
||
} | ||
|
||
} | ||
|
||
|
||
|
||
class Bar extends Foo.Object { // should work | ||
>Bar : Symbol(Bar, Decl(checkForObjectTooStrict.ts, 6, 1)) | ||
>Foo.Object : Symbol(Foo.Object, Decl(checkForObjectTooStrict.ts, 0, 12)) | ||
>Foo : Symbol(Foo, Decl(checkForObjectTooStrict.ts, 0, 0)) | ||
>Object : Symbol(Foo.Object, Decl(checkForObjectTooStrict.ts, 0, 12)) | ||
|
||
constructor () { | ||
|
||
super(); | ||
>super : Symbol(Foo.Object, Decl(checkForObjectTooStrict.ts, 0, 12)) | ||
|
||
} | ||
|
||
} | ||
|
||
|
||
class Baz extends Object { | ||
>Baz : Symbol(Baz, Decl(checkForObjectTooStrict.ts, 18, 1)) | ||
>Object : Symbol(Object, Decl(lib.d.ts, 92, 1), Decl(lib.d.ts, 223, 11)) | ||
|
||
constructor () { // ERROR, as expected | ||
|
||
super(); | ||
>super : Symbol(ObjectConstructor, Decl(lib.d.ts, 124, 1)) | ||
|
||
} | ||
|
||
} | ||
|
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,44 @@ | ||
=== tests/cases/compiler/checkForObjectTooStrict.ts === | ||
module Foo { | ||
>Foo : typeof Foo | ||
|
||
export class Object { | ||
>Object : Object | ||
|
||
} | ||
|
||
} | ||
|
||
|
||
|
||
class Bar extends Foo.Object { // should work | ||
>Bar : Bar | ||
>Foo.Object : Foo.Object | ||
>Foo : typeof Foo | ||
>Object : typeof Foo.Object | ||
|
||
constructor () { | ||
|
||
super(); | ||
>super() : void | ||
>super : typeof Foo.Object | ||
|
||
} | ||
|
||
} | ||
|
||
|
||
class Baz extends Object { | ||
>Baz : Baz | ||
>Object : Object | ||
|
||
constructor () { // ERROR, as expected | ||
|
||
super(); | ||
>super() : void | ||
>super : ObjectConstructor | ||
|
||
} | ||
|
||
} | ||
|
Oops, something went wrong.