-
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.
Reuse cached resolved signatures early (#60208)
- Loading branch information
Showing
5 changed files
with
132 additions
and
11 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
22 changes: 22 additions & 0 deletions
22
tests/baselines/reference/mixinWithBaseDependingOnSelfNoCrash1.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 |
---|---|---|
@@ -0,0 +1,22 @@ | ||
mixinWithBaseDependingOnSelfNoCrash1.ts(11,48): error TS2345: Argument of type 'typeof BaseItem' is not assignable to parameter of type 'new (...args: any[]) => any'. | ||
Type 'typeof BaseItem' provides no match for the signature 'new (...args: any[]): any'. | ||
|
||
|
||
==== mixinWithBaseDependingOnSelfNoCrash1.ts (1 errors) ==== | ||
// https://github.com/microsoft/TypeScript/issues/60202 | ||
|
||
declare class Document<Parent> {} | ||
|
||
declare class BaseItem extends Document<typeof Item> {} | ||
|
||
declare function ClientDocumentMixin< | ||
BaseClass extends new (...args: any[]) => any, | ||
>(Base: BaseClass): any; | ||
|
||
declare class Item extends ClientDocumentMixin(BaseItem) {} | ||
~~~~~~~~ | ||
!!! error TS2345: Argument of type 'typeof BaseItem' is not assignable to parameter of type 'new (...args: any[]) => any'. | ||
!!! error TS2345: Type 'typeof BaseItem' provides no match for the signature 'new (...args: any[]): any'. | ||
|
||
export {}; | ||
|
32 changes: 32 additions & 0 deletions
32
tests/baselines/reference/mixinWithBaseDependingOnSelfNoCrash1.symbols
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,32 @@ | ||
//// [tests/cases/conformance/classes/mixinWithBaseDependingOnSelfNoCrash1.ts] //// | ||
|
||
=== mixinWithBaseDependingOnSelfNoCrash1.ts === | ||
// https://github.com/microsoft/TypeScript/issues/60202 | ||
|
||
declare class Document<Parent> {} | ||
>Document : Symbol(Document, Decl(mixinWithBaseDependingOnSelfNoCrash1.ts, 0, 0)) | ||
>Parent : Symbol(Parent, Decl(mixinWithBaseDependingOnSelfNoCrash1.ts, 2, 23)) | ||
|
||
declare class BaseItem extends Document<typeof Item> {} | ||
>BaseItem : Symbol(BaseItem, Decl(mixinWithBaseDependingOnSelfNoCrash1.ts, 2, 33)) | ||
>Document : Symbol(Document, Decl(mixinWithBaseDependingOnSelfNoCrash1.ts, 0, 0)) | ||
>Item : Symbol(Item, Decl(mixinWithBaseDependingOnSelfNoCrash1.ts, 8, 24)) | ||
|
||
declare function ClientDocumentMixin< | ||
>ClientDocumentMixin : Symbol(ClientDocumentMixin, Decl(mixinWithBaseDependingOnSelfNoCrash1.ts, 4, 55)) | ||
|
||
BaseClass extends new (...args: any[]) => any, | ||
>BaseClass : Symbol(BaseClass, Decl(mixinWithBaseDependingOnSelfNoCrash1.ts, 6, 37)) | ||
>args : Symbol(args, Decl(mixinWithBaseDependingOnSelfNoCrash1.ts, 7, 25)) | ||
|
||
>(Base: BaseClass): any; | ||
>Base : Symbol(Base, Decl(mixinWithBaseDependingOnSelfNoCrash1.ts, 8, 2)) | ||
>BaseClass : Symbol(BaseClass, Decl(mixinWithBaseDependingOnSelfNoCrash1.ts, 6, 37)) | ||
|
||
declare class Item extends ClientDocumentMixin(BaseItem) {} | ||
>Item : Symbol(Item, Decl(mixinWithBaseDependingOnSelfNoCrash1.ts, 8, 24)) | ||
>ClientDocumentMixin : Symbol(ClientDocumentMixin, Decl(mixinWithBaseDependingOnSelfNoCrash1.ts, 4, 55)) | ||
>BaseItem : Symbol(BaseItem, Decl(mixinWithBaseDependingOnSelfNoCrash1.ts, 2, 33)) | ||
|
||
export {}; | ||
|
41 changes: 41 additions & 0 deletions
41
tests/baselines/reference/mixinWithBaseDependingOnSelfNoCrash1.types
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,41 @@ | ||
//// [tests/cases/conformance/classes/mixinWithBaseDependingOnSelfNoCrash1.ts] //// | ||
|
||
=== mixinWithBaseDependingOnSelfNoCrash1.ts === | ||
// https://github.com/microsoft/TypeScript/issues/60202 | ||
|
||
declare class Document<Parent> {} | ||
>Document : Document<Parent> | ||
> : ^^^^^^^^^^^^^^^^ | ||
|
||
declare class BaseItem extends Document<typeof Item> {} | ||
>BaseItem : BaseItem | ||
> : ^^^^^^^^ | ||
>Document : Document<typeof Item> | ||
> : ^^^^^^^^^^^^^^^^^^^^^ | ||
>Item : typeof Item | ||
> : ^^^^^^^^^^^ | ||
|
||
declare function ClientDocumentMixin< | ||
>ClientDocumentMixin : <BaseClass extends new (...args: any[]) => any>(Base: BaseClass) => any | ||
> : ^ ^^^^^^^^^ ^^ ^^ ^^^^^ | ||
|
||
BaseClass extends new (...args: any[]) => any, | ||
>args : any[] | ||
> : ^^^^^ | ||
|
||
>(Base: BaseClass): any; | ||
>Base : BaseClass | ||
> : ^^^^^^^^^ | ||
|
||
declare class Item extends ClientDocumentMixin(BaseItem) {} | ||
>Item : Item | ||
> : ^^^^ | ||
>ClientDocumentMixin(BaseItem) : any | ||
> : ^^^ | ||
>ClientDocumentMixin : <BaseClass extends new (...args: any[]) => any>(Base: BaseClass) => any | ||
> : ^ ^^^^^^^^^ ^^ ^^ ^^^^^ | ||
>BaseItem : typeof BaseItem | ||
> : ^^^^^^^^^^^^^^^ | ||
|
||
export {}; | ||
|
16 changes: 16 additions & 0 deletions
16
tests/cases/conformance/classes/mixinWithBaseDependingOnSelfNoCrash1.ts
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,16 @@ | ||
// @strict: true | ||
// @noEmit: true | ||
|
||
// https://github.com/microsoft/TypeScript/issues/60202 | ||
|
||
declare class Document<Parent> {} | ||
|
||
declare class BaseItem extends Document<typeof Item> {} | ||
|
||
declare function ClientDocumentMixin< | ||
BaseClass extends new (...args: any[]) => any, | ||
>(Base: BaseClass): any; | ||
|
||
declare class Item extends ClientDocumentMixin(BaseItem) {} | ||
|
||
export {}; |