forked from microsoft/TypeScript
-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add baselines for test from microsoft#43485
- Loading branch information
Showing
4 changed files
with
95 additions
and
0 deletions.
There are no files selected for viewing
20 changes: 20 additions & 0 deletions
20
tests/baselines/reference/conditionalTypeVarianceBigArrayConstraintsPerformance.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,20 @@ | ||
tests/cases/compiler/conditionalTypeVarianceBigArrayConstraintsPerformance.ts(9,5): error TS2322: Type 'Stuff<U>' is not assignable to type 'Stuff<T>'. | ||
Type 'U' is not assignable to type 'T'. | ||
'T' could be instantiated with an arbitrary type which could be unrelated to 'U'. | ||
|
||
|
||
==== tests/cases/compiler/conditionalTypeVarianceBigArrayConstraintsPerformance.ts (1 errors) ==== | ||
/// <reference path="/.lib/react16.d.ts" /> | ||
|
||
type Stuff<T> = | ||
T extends keyof JSX.IntrinsicElements | ||
? JSX.IntrinsicElements[T] | ||
: any; | ||
|
||
function F<T, U>(p1: Stuff<T>, p2: Stuff<U>) { | ||
p1 = p2; // Error | ||
~~ | ||
!!! error TS2322: Type 'Stuff<U>' is not assignable to type 'Stuff<T>'. | ||
!!! error TS2322: Type 'U' is not assignable to type 'T'. | ||
!!! error TS2322: 'T' could be instantiated with an arbitrary type which could be unrelated to 'U'. | ||
} |
17 changes: 17 additions & 0 deletions
17
tests/baselines/reference/conditionalTypeVarianceBigArrayConstraintsPerformance.js
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,17 @@ | ||
//// [conditionalTypeVarianceBigArrayConstraintsPerformance.ts] | ||
/// <reference path="/.lib/react16.d.ts" /> | ||
|
||
type Stuff<T> = | ||
T extends keyof JSX.IntrinsicElements | ||
? JSX.IntrinsicElements[T] | ||
: any; | ||
|
||
function F<T, U>(p1: Stuff<T>, p2: Stuff<U>) { | ||
p1 = p2; // Error | ||
} | ||
|
||
//// [conditionalTypeVarianceBigArrayConstraintsPerformance.js] | ||
/// <reference path="react16.d.ts" /> | ||
function F(p1, p2) { | ||
p1 = p2; // Error | ||
} |
34 changes: 34 additions & 0 deletions
34
tests/baselines/reference/conditionalTypeVarianceBigArrayConstraintsPerformance.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,34 @@ | ||
=== tests/cases/compiler/conditionalTypeVarianceBigArrayConstraintsPerformance.ts === | ||
/// <reference path="react16.d.ts" /> | ||
|
||
type Stuff<T> = | ||
>Stuff : Symbol(Stuff, Decl(conditionalTypeVarianceBigArrayConstraintsPerformance.ts, 0, 0)) | ||
>T : Symbol(T, Decl(conditionalTypeVarianceBigArrayConstraintsPerformance.ts, 2, 11)) | ||
|
||
T extends keyof JSX.IntrinsicElements | ||
>T : Symbol(T, Decl(conditionalTypeVarianceBigArrayConstraintsPerformance.ts, 2, 11)) | ||
>JSX : Symbol(JSX, Decl(react16.d.ts, 2493, 12)) | ||
>IntrinsicElements : Symbol(JSX.IntrinsicElements, Decl(react16.d.ts, 2514, 86)) | ||
|
||
? JSX.IntrinsicElements[T] | ||
>JSX : Symbol(JSX, Decl(react16.d.ts, 2493, 12)) | ||
>IntrinsicElements : Symbol(JSX.IntrinsicElements, Decl(react16.d.ts, 2514, 86)) | ||
>T : Symbol(T, Decl(conditionalTypeVarianceBigArrayConstraintsPerformance.ts, 2, 11)) | ||
|
||
: any; | ||
|
||
function F<T, U>(p1: Stuff<T>, p2: Stuff<U>) { | ||
>F : Symbol(F, Decl(conditionalTypeVarianceBigArrayConstraintsPerformance.ts, 5, 14)) | ||
>T : Symbol(T, Decl(conditionalTypeVarianceBigArrayConstraintsPerformance.ts, 7, 11)) | ||
>U : Symbol(U, Decl(conditionalTypeVarianceBigArrayConstraintsPerformance.ts, 7, 13)) | ||
>p1 : Symbol(p1, Decl(conditionalTypeVarianceBigArrayConstraintsPerformance.ts, 7, 17)) | ||
>Stuff : Symbol(Stuff, Decl(conditionalTypeVarianceBigArrayConstraintsPerformance.ts, 0, 0)) | ||
>T : Symbol(T, Decl(conditionalTypeVarianceBigArrayConstraintsPerformance.ts, 7, 11)) | ||
>p2 : Symbol(p2, Decl(conditionalTypeVarianceBigArrayConstraintsPerformance.ts, 7, 30)) | ||
>Stuff : Symbol(Stuff, Decl(conditionalTypeVarianceBigArrayConstraintsPerformance.ts, 0, 0)) | ||
>U : Symbol(U, Decl(conditionalTypeVarianceBigArrayConstraintsPerformance.ts, 7, 13)) | ||
|
||
p1 = p2; // Error | ||
>p1 : Symbol(p1, Decl(conditionalTypeVarianceBigArrayConstraintsPerformance.ts, 7, 17)) | ||
>p2 : Symbol(p2, Decl(conditionalTypeVarianceBigArrayConstraintsPerformance.ts, 7, 30)) | ||
} |
24 changes: 24 additions & 0 deletions
24
tests/baselines/reference/conditionalTypeVarianceBigArrayConstraintsPerformance.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,24 @@ | ||
=== tests/cases/compiler/conditionalTypeVarianceBigArrayConstraintsPerformance.ts === | ||
/// <reference path="react16.d.ts" /> | ||
|
||
type Stuff<T> = | ||
>Stuff : Stuff<T> | ||
|
||
T extends keyof JSX.IntrinsicElements | ||
>JSX : any | ||
|
||
? JSX.IntrinsicElements[T] | ||
>JSX : any | ||
|
||
: any; | ||
|
||
function F<T, U>(p1: Stuff<T>, p2: Stuff<U>) { | ||
>F : <T, U>(p1: Stuff<T>, p2: Stuff<U>) => void | ||
>p1 : Stuff<T> | ||
>p2 : Stuff<U> | ||
|
||
p1 = p2; // Error | ||
>p1 = p2 : Stuff<U> | ||
>p1 : Stuff<T> | ||
>p2 : Stuff<U> | ||
} |