Accept new baselines

This commit is contained in:
Anders Hejlsberg
2017-04-05 11:07:49 -07:00
parent ae386a9c32
commit bea20a997b
9 changed files with 46 additions and 46 deletions

View File

@@ -59,5 +59,5 @@ exports.runSampleBreaks = runSampleBreaks;
export declare class bluebird<T> {
static all: Array<bluebird<any>>;
}
export declare function runSampleWorks<A, B, C, D, E>(a: bluebird<A>, b?: bluebird<B>, c?: bluebird<C>, d?: bluebird<D>, e?: bluebird<E>): Promise<(<T>(f: (a: A, b?: B, c?: C, d?: D, e?: E) => T) => T) & {}>;
export declare function runSampleWorks<A, B, C, D, E>(a: bluebird<A>, b?: bluebird<B>, c?: bluebird<C>, d?: bluebird<D>, e?: bluebird<E>): Promise<(<T>(f: (a: A, b?: B, c?: C, d?: D, e?: E) => T) => T)>;
export declare function runSampleBreaks<A, B, C, D, E>(a: bluebird<A>, b?: bluebird<B>, c?: bluebird<C>, d?: bluebird<D>, e?: bluebird<E>): Promise<(<T>(f: (a: A, b?: B, c?: C, d?: D, e?: E) => T) => T)>;

View File

@@ -10,7 +10,7 @@ export class bluebird<T> {
}
export async function runSampleWorks<A, B, C, D, E>(
>runSampleWorks : <A, B, C, D, E>(a: bluebird<A>, b?: bluebird<B>, c?: bluebird<C>, d?: bluebird<D>, e?: bluebird<E>) => Promise<(<T>(f: (a: A, b?: B, c?: C, d?: D, e?: E) => T) => T) & {}>
>runSampleWorks : <A, B, C, D, E>(a: bluebird<A>, b?: bluebird<B>, c?: bluebird<C>, d?: bluebird<D>, e?: bluebird<E>) => Promise<(<T>(f: (a: A, b?: B, c?: C, d?: D, e?: E) => T) => T)>
>A : A
>B : B
>C : C
@@ -85,13 +85,13 @@ export async function runSampleWorks<A, B, C, D, E>(
>result : any
let rfunc: typeof func & {} = func as any; // <- This is the only difference
>rfunc : (<T>(f: (a: A, b?: B, c?: C, d?: D, e?: E) => T) => T) & {}
>rfunc : <T>(f: (a: A, b?: B, c?: C, d?: D, e?: E) => T) => T
>func : <T>(f: (a: A, b?: B, c?: C, d?: D, e?: E) => T) => T
>func as any : any
>func : <T>(f: (a: A, b?: B, c?: C, d?: D, e?: E) => T) => T
return rfunc
>rfunc : (<T>(f: (a: A, b?: B, c?: C, d?: D, e?: E) => T) => T) & {}
>rfunc : <T>(f: (a: A, b?: B, c?: C, d?: D, e?: E) => T) => T
}
export async function runSampleBreaks<A, B, C, D, E>(

View File

@@ -1094,7 +1094,7 @@ declare function f12<T, U = T & B>(a?: T, b?: U): [T, U];
// inference
f12();
>f12() : [{}, {} & B]
>f12() : [{}, B]
>f12 : <T, U = T & B>(a?: T, b?: U) => [T, U]
f12(a);
@@ -1856,7 +1856,7 @@ declare function f19<T = U, U = T & B>(a?: T, b?: U): [T, U];
// inference
f19();
>f19() : [{}, {} & B]
>f19() : [{}, B]
>f19 : <T = U, U = T & B>(a?: T, b?: U) => [T, U]
f19(a);
@@ -1950,11 +1950,11 @@ declare function f20<T, U = V, V = U & C>(a?: T, b?: U, c?: V): [T, U, V];
// inference
f20();
>f20() : [{}, {}, {} & C]
>f20() : [{}, {}, C]
>f20 : <T, U = V, V = U & C>(a?: T, b?: U, c?: V) => [T, U, V]
f20(a);
>f20(a) : [A, {}, {} & C]
>f20(a) : [A, {}, C]
>f20 : <T, U = V, V = U & C>(a?: T, b?: U, c?: V) => [T, U, V]
>a : A
@@ -1973,25 +1973,25 @@ f20(a, b, c);
// no inference, partially supplied
f20<A>();
>f20<A>() : [A, {}, {} & C]
>f20<A>() : [A, {}, C]
>f20 : <T, U = V, V = U & C>(a?: T, b?: U, c?: V) => [T, U, V]
>A : A
f20<A>(a);
>f20<A>(a) : [A, {}, {} & C]
>f20<A>(a) : [A, {}, C]
>f20 : <T, U = V, V = U & C>(a?: T, b?: U, c?: V) => [T, U, V]
>A : A
>a : A
f20<A>(a, b);
>f20<A>(a, b) : [A, {}, {} & C]
>f20<A>(a, b) : [A, {}, C]
>f20 : <T, U = V, V = U & C>(a?: T, b?: U, c?: V) => [T, U, V]
>A : A
>a : A
>b : B
f20<A>(a, b, bc);
>f20<A>(a, b, bc) : [A, {}, {} & C]
>f20<A>(a, b, bc) : [A, {}, C]
>f20 : <T, U = V, V = U & C>(a?: T, b?: U, c?: V) => [T, U, V]
>A : A
>a : A

View File

@@ -1866,9 +1866,9 @@ let c1 = new Component1({
c1.get("hello");
>c1.get("hello") : string
>c1.get : <K extends "hello">(key: K) => ({ hello: string; } & {})[K]
>c1.get : <K extends "hello">(key: K) => { hello: string; }[K]
>c1 : Component1<{ hello: string; }, {}>
>get : <K extends "hello">(key: K) => ({ hello: string; } & {})[K]
>get : <K extends "hello">(key: K) => { hello: string; }[K]
>"hello" : "hello"
// Repro from #12625

View File

@@ -1,5 +1,5 @@
tests/cases/conformance/jsx/file.tsx(11,21): error TS2322: Type '{ prop1: "hello"; }' is not assignable to type 'IntrinsicAttributes & IntrinsicClassAttributes<BigGreeter> & {} & { children?: ReactNode; }'.
Property 'prop1' does not exist on type 'IntrinsicAttributes & IntrinsicClassAttributes<BigGreeter> & {} & { children?: ReactNode; }'.
tests/cases/conformance/jsx/file.tsx(11,21): error TS2322: Type '{ prop1: "hello"; }' is not assignable to type 'IntrinsicAttributes & IntrinsicClassAttributes<BigGreeter> & { children?: ReactNode; }'.
Property 'prop1' does not exist on type 'IntrinsicAttributes & IntrinsicClassAttributes<BigGreeter> & { children?: ReactNode; }'.
==== tests/cases/conformance/jsx/file.tsx (1 errors) ====
@@ -15,8 +15,8 @@ tests/cases/conformance/jsx/file.tsx(11,21): error TS2322: Type '{ prop1: "hello
// Error
let a = <BigGreeter prop1="hello" />
~~~~~~~~~~~~~
!!! error TS2322: Type '{ prop1: "hello"; }' is not assignable to type 'IntrinsicAttributes & IntrinsicClassAttributes<BigGreeter> & {} & { children?: ReactNode; }'.
!!! error TS2322: Property 'prop1' does not exist on type 'IntrinsicAttributes & IntrinsicClassAttributes<BigGreeter> & {} & { children?: ReactNode; }'.
!!! error TS2322: Type '{ prop1: "hello"; }' is not assignable to type 'IntrinsicAttributes & IntrinsicClassAttributes<BigGreeter> & { children?: ReactNode; }'.
!!! error TS2322: Property 'prop1' does not exist on type 'IntrinsicAttributes & IntrinsicClassAttributes<BigGreeter> & { children?: ReactNode; }'.
// OK
let b = <BigGreeter ref={(input) => { this.textInput = input; }} />

View File

@@ -2,8 +2,8 @@ tests/cases/conformance/jsx/file.tsx(20,19): error TS2322: Type '{ x: string; y:
Type '{ x: string; y: number; }' is not assignable to type 'PoisonedProp'.
Types of property 'y' are incompatible.
Type 'number' is not assignable to type '2'.
tests/cases/conformance/jsx/file.tsx(33,20): error TS2322: Type '{ prop1: boolean; }' is not assignable to type 'IntrinsicAttributes & IntrinsicClassAttributes<EmptyProp> & {} & { children?: ReactNode; }'.
Property 'prop1' does not exist on type 'IntrinsicAttributes & IntrinsicClassAttributes<EmptyProp> & {} & { children?: ReactNode; }'.
tests/cases/conformance/jsx/file.tsx(33,20): error TS2322: Type '{ prop1: boolean; }' is not assignable to type 'IntrinsicAttributes & IntrinsicClassAttributes<EmptyProp> & { children?: ReactNode; }'.
Property 'prop1' does not exist on type 'IntrinsicAttributes & IntrinsicClassAttributes<EmptyProp> & { children?: ReactNode; }'.
==== tests/cases/conformance/jsx/file.tsx (2 errors) ====
@@ -46,5 +46,5 @@ tests/cases/conformance/jsx/file.tsx(33,20): error TS2322: Type '{ prop1: boolea
// Error
let e = <EmptyProp {...o} />;
~~~~~~
!!! error TS2322: Type '{ prop1: boolean; }' is not assignable to type 'IntrinsicAttributes & IntrinsicClassAttributes<EmptyProp> & {} & { children?: ReactNode; }'.
!!! error TS2322: Property 'prop1' does not exist on type 'IntrinsicAttributes & IntrinsicClassAttributes<EmptyProp> & {} & { children?: ReactNode; }'.
!!! error TS2322: Type '{ prop1: boolean; }' is not assignable to type 'IntrinsicAttributes & IntrinsicClassAttributes<EmptyProp> & { children?: ReactNode; }'.
!!! error TS2322: Property 'prop1' does not exist on type 'IntrinsicAttributes & IntrinsicClassAttributes<EmptyProp> & { children?: ReactNode; }'.

View File

@@ -9,13 +9,13 @@ tests/cases/conformance/jsx/file.tsx(29,15): error TS2322: Type '{ naaaaaaame: "
tests/cases/conformance/jsx/file.tsx(34,23): error TS2322: Type '{}' is not assignable to type 'IntrinsicAttributes & { "prop-name": string; }'.
Type '{}' is not assignable to type '{ "prop-name": string; }'.
Property '"prop-name"' is missing in type '{}'.
tests/cases/conformance/jsx/file.tsx(37,23): error TS2322: Type '{ prop1: true; }' is not assignable to type 'IntrinsicAttributes & {}'.
Property 'prop1' does not exist on type 'IntrinsicAttributes & {}'.
tests/cases/conformance/jsx/file.tsx(38,24): error TS2322: Type '{ ref: (x: any) => any; }' is not assignable to type 'IntrinsicAttributes & {}'.
Property 'ref' does not exist on type 'IntrinsicAttributes & {}'.
tests/cases/conformance/jsx/file.tsx(37,23): error TS2322: Type '{ prop1: true; }' is not assignable to type 'IntrinsicAttributes'.
Property 'prop1' does not exist on type 'IntrinsicAttributes'.
tests/cases/conformance/jsx/file.tsx(38,24): error TS2322: Type '{ ref: (x: any) => any; }' is not assignable to type 'IntrinsicAttributes'.
Property 'ref' does not exist on type 'IntrinsicAttributes'.
tests/cases/conformance/jsx/file.tsx(41,16): error TS1005: ',' expected.
tests/cases/conformance/jsx/file.tsx(45,24): error TS2322: Type '{ prop1: boolean; }' is not assignable to type 'IntrinsicAttributes & {}'.
Property 'prop1' does not exist on type 'IntrinsicAttributes & {}'.
tests/cases/conformance/jsx/file.tsx(45,24): error TS2322: Type '{ prop1: boolean; }' is not assignable to type 'IntrinsicAttributes'.
Property 'prop1' does not exist on type 'IntrinsicAttributes'.
==== tests/cases/conformance/jsx/file.tsx (8 errors) ====
@@ -72,12 +72,12 @@ tests/cases/conformance/jsx/file.tsx(45,24): error TS2322: Type '{ prop1: boolea
// Error
let i = <EmptyPropSFC prop1 />
~~~~~
!!! error TS2322: Type '{ prop1: true; }' is not assignable to type 'IntrinsicAttributes & {}'.
!!! error TS2322: Property 'prop1' does not exist on type 'IntrinsicAttributes & {}'.
!!! error TS2322: Type '{ prop1: true; }' is not assignable to type 'IntrinsicAttributes'.
!!! error TS2322: Property 'prop1' does not exist on type 'IntrinsicAttributes'.
let i1 = <EmptyPropSFC ref={x => x.greeting.substr(10)} />
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
!!! error TS2322: Type '{ ref: (x: any) => any; }' is not assignable to type 'IntrinsicAttributes & {}'.
!!! error TS2322: Property 'ref' does not exist on type 'IntrinsicAttributes & {}'.
!!! error TS2322: Type '{ ref: (x: any) => any; }' is not assignable to type 'IntrinsicAttributes'.
!!! error TS2322: Property 'ref' does not exist on type 'IntrinsicAttributes'.
let o = {
prop1: true;
@@ -88,8 +88,8 @@ tests/cases/conformance/jsx/file.tsx(45,24): error TS2322: Type '{ prop1: boolea
// Error
let i2 = <EmptyPropSFC {...o} />
~~~~~~
!!! error TS2322: Type '{ prop1: boolean; }' is not assignable to type 'IntrinsicAttributes & {}'.
!!! error TS2322: Property 'prop1' does not exist on type 'IntrinsicAttributes & {}'.
!!! error TS2322: Type '{ prop1: boolean; }' is not assignable to type 'IntrinsicAttributes'.
!!! error TS2322: Property 'prop1' does not exist on type 'IntrinsicAttributes'.
let o1: any;
// OK

View File

@@ -3,10 +3,10 @@ tests/cases/conformance/jsx/file.tsx(32,17): error TS2322: Type '{ x: true; }' i
Type '{ x: true; }' is not assignable to type '{ x: string; }'.
Types of property 'x' are incompatible.
Type 'true' is not assignable to type 'string'.
tests/cases/conformance/jsx/file.tsx(33,21): error TS2322: Type '{ x: 10; }' is not assignable to type 'IntrinsicAttributes & IntrinsicClassAttributes<RC4> & {} & { children?: ReactNode; }'.
Property 'x' does not exist on type 'IntrinsicAttributes & IntrinsicClassAttributes<RC4> & {} & { children?: ReactNode; }'.
tests/cases/conformance/jsx/file.tsx(34,22): error TS2322: Type '{ prop: true; }' is not assignable to type 'IntrinsicAttributes & IntrinsicClassAttributes<RC3> & {} & { children?: ReactNode; }'.
Property 'prop' does not exist on type 'IntrinsicAttributes & IntrinsicClassAttributes<RC3> & {} & { children?: ReactNode; }'.
tests/cases/conformance/jsx/file.tsx(33,21): error TS2322: Type '{ x: 10; }' is not assignable to type 'IntrinsicAttributes & IntrinsicClassAttributes<RC4> & { children?: ReactNode; }'.
Property 'x' does not exist on type 'IntrinsicAttributes & IntrinsicClassAttributes<RC4> & { children?: ReactNode; }'.
tests/cases/conformance/jsx/file.tsx(34,22): error TS2322: Type '{ prop: true; }' is not assignable to type 'IntrinsicAttributes & IntrinsicClassAttributes<RC3> & { children?: ReactNode; }'.
Property 'prop' does not exist on type 'IntrinsicAttributes & IntrinsicClassAttributes<RC3> & { children?: ReactNode; }'.
==== tests/cases/conformance/jsx/file.tsx (3 errors) ====
@@ -50,10 +50,10 @@ tests/cases/conformance/jsx/file.tsx(34,22): error TS2322: Type '{ prop: true; }
!!! error TS2322: Type 'true' is not assignable to type 'string'.
let b = <PartRCComp x={10} />
~~~~~~
!!! error TS2322: Type '{ x: 10; }' is not assignable to type 'IntrinsicAttributes & IntrinsicClassAttributes<RC4> & {} & { children?: ReactNode; }'.
!!! error TS2322: Property 'x' does not exist on type 'IntrinsicAttributes & IntrinsicClassAttributes<RC4> & {} & { children?: ReactNode; }'.
!!! error TS2322: Type '{ x: 10; }' is not assignable to type 'IntrinsicAttributes & IntrinsicClassAttributes<RC4> & { children?: ReactNode; }'.
!!! error TS2322: Property 'x' does not exist on type 'IntrinsicAttributes & IntrinsicClassAttributes<RC4> & { children?: ReactNode; }'.
let c = <EmptyRCComp prop />;
~~~~
!!! error TS2322: Type '{ prop: true; }' is not assignable to type 'IntrinsicAttributes & IntrinsicClassAttributes<RC3> & {} & { children?: ReactNode; }'.
!!! error TS2322: Property 'prop' does not exist on type 'IntrinsicAttributes & IntrinsicClassAttributes<RC3> & {} & { children?: ReactNode; }'.
!!! error TS2322: Type '{ prop: true; }' is not assignable to type 'IntrinsicAttributes & IntrinsicClassAttributes<RC3> & { children?: ReactNode; }'.
!!! error TS2322: Property 'prop' does not exist on type 'IntrinsicAttributes & IntrinsicClassAttributes<RC3> & { children?: ReactNode; }'.

View File

@@ -1,5 +1,5 @@
tests/cases/conformance/jsx/file.tsx(18,23): error TS2322: Type '{ x: true; }' is not assignable to type 'IntrinsicAttributes & {}'.
Property 'x' does not exist on type 'IntrinsicAttributes & {}'.
tests/cases/conformance/jsx/file.tsx(18,23): error TS2322: Type '{ x: true; }' is not assignable to type 'IntrinsicAttributes'.
Property 'x' does not exist on type 'IntrinsicAttributes'.
tests/cases/conformance/jsx/file.tsx(19,27): error TS2322: Type '{ x: "hi"; }' is not assignable to type 'IntrinsicAttributes & { x: boolean; }'.
Type '{ x: "hi"; }' is not assignable to type '{ x: boolean; }'.
Types of property 'x' are incompatible.
@@ -32,8 +32,8 @@ tests/cases/conformance/jsx/file.tsx(21,27): error TS2322: Type '{}' is not assi
// Error
let a = <EmptySFCComp x />;
~
!!! error TS2322: Type '{ x: true; }' is not assignable to type 'IntrinsicAttributes & {}'.
!!! error TS2322: Property 'x' does not exist on type 'IntrinsicAttributes & {}'.
!!! error TS2322: Type '{ x: true; }' is not assignable to type 'IntrinsicAttributes'.
!!! error TS2322: Property 'x' does not exist on type 'IntrinsicAttributes'.
let b = <SFC2AndEmptyComp x="hi" />;
~~~~~~
!!! error TS2322: Type '{ x: "hi"; }' is not assignable to type 'IntrinsicAttributes & { x: boolean; }'.