8000 Allow expressions in class extends clauses by ahejlsberg · Pull Request #3516 · microsoft/TypeScript · GitHub
[go: up one dir, main page]

Skip to content

Allow expressions in class extends clauses #3516

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 18 commits into from
Jun 17, 2015
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Accepting new baselines after merge
  • Loading branch information
ahejlsberg committed Jun 16, 2015
commit f6bcf7074caac8df6b4cd9b55269315cf2f03331
9 changes: 3 additions & 6 deletions tests/baselines/reference/genericTypeConstraints.errors.txt
Original file line number Diff line number Diff line change
@@ -1,9 +1,8 @@
tests/cases/compiler/genericTypeConstraints.ts(9,27): error TS2344: Type 'FooExtended' does not satisfy the constraint 'Foo'.
Property 'fooMethod' is missing in type 'FooExtended'.
tests/cases/compiler/genericTypeConstraints.ts(9,31): error TS2344: Type 'FooExtended' does not satisfy the constraint 'Foo'.
Property 'fooMethod' is missing in type 'FooExtended'.


==== tests/cases/compiler/genericTypeConstraints.ts (2 errors) ====
==== tests/cases/compiler/genericTypeConstraints.ts (1 errors) ====
class Foo {
fooMethod() {}
}
Expand All @@ -13,11 +12,9 @@ tests/cases/compiler/genericTypeConstraints.ts(9,31): error TS2344: Type 'FooExt
class Bar<T extends Foo> { }

class BarExtended extends Bar<FooExtended> {
~~~~~~~~~~~~~~~~
!!! error TS2344: Type 'FooExtended' does not satisfy the constraint 'Foo'.
!!! error TS2344: Property 'fooMethod' is missing in type 'FooExtended'.
~~~~~~~~~~~
!!! error TS2344: Type 'FooExtended' does not satisfy the constraint 'Foo'.
!!! error TS2344: Property 'fooMethod' is missing in type 'FooExtended'.
constructor() {
super();
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,10 +21,11 @@ tests/cases/compiler/strictModeReservedWordInClassDeclaration.ts(26,21): error T
tests/cases/compiler/strictModeReservedWordInClassDeclaration.ts(26,21): error TS2503: Cannot find namespace 'public'.
tests/cases/compiler/strictModeReservedWordInClassDeclaration.ts(27,17): error TS1213: Identifier expected. 'package' is a reserved word in strict mode. Class definitions are automatically in strict mode.
tests/cases/compiler/strictModeReservedWordInClassDeclaration.ts(27,17): error TS2304: Cannot find name 'package'.
tests/cases/compiler/strictModeReservedWordInClassDeclaration.ts(28,17): error TS1213: Identifier expected. 'package' is a reserved word in strict mode. Class definitions are automatically in strict mode.
tests/cases/compiler/strictModeReservedWordInClassDeclaration.ts(28,17): error TS2304: Cannot find name 'package'.


==== tests/cases/compiler/strictModeReservedWordInClassDeclaration.ts (23 errors) ====
==== tests/cases/compiler/strictModeReservedWordInClassDeclaration.ts (25 errors) ====
interface public { }

class Foo {
Expand Down Expand Up @@ -100,4 +101,6 @@ tests/cases/compiler/strictModeReservedWordInClassDeclaration.ts(28,17): error T
!!! error TS2304: Cannot find name 'package'.
class H extends package.A { }
~~~~~~~
!!! error TS2304: Cannot find name 'package'.
!!! error TS1213: Identifier expected. 'package' is a reserved word in strict mode. Class definitions are automatically in strict mode.
~~~~~~~
!!! error TS2304: Cannot find name 'package'.
0