Accepting new baselines

This commit is contained in:
Anders Hejlsberg 2015-10-03 18:09:11 -07:00
parent 139b5545a0
commit d9933c8d0e
6 changed files with 310 additions and 0 deletions

View File

@ -0,0 +1,29 @@
//// [recursiveGenericUnionType1.ts]
declare module Test1 {
export type Container<T> = T | {
[i: string]: Container<T>;
};
export type IStringContainer = Container<string>;
}
declare module Test2 {
export type Container<T> = T | {
[i: string]: Container<T>;
};
export type IStringContainer = Container<string>;
}
var x: Test1.Container<number>;
var s1: Test1.IStringContainer;
var s2: Test2.IStringContainer;
s1 = s2;
s2 = s1;
//// [recursiveGenericUnionType1.js]
var x;
var s1;
var s2;
s1 = s2;
s2 = s1;

View File

@ -0,0 +1,62 @@
=== tests/cases/compiler/recursiveGenericUnionType1.ts ===
declare module Test1 {
>Test1 : Symbol(Test1, Decl(recursiveGenericUnionType1.ts, 0, 0))
export type Container<T> = T | {
>Container : Symbol(Container, Decl(recursiveGenericUnionType1.ts, 0, 22))
>T : Symbol(T, Decl(recursiveGenericUnionType1.ts, 1, 26))
>T : Symbol(T, Decl(recursiveGenericUnionType1.ts, 1, 26))
[i: string]: Container<T>;
>i : Symbol(i, Decl(recursiveGenericUnionType1.ts, 2, 9))
>Container : Symbol(Container, Decl(recursiveGenericUnionType1.ts, 0, 22))
>T : Symbol(T, Decl(recursiveGenericUnionType1.ts, 1, 26))
};
export type IStringContainer = Container<string>;
>IStringContainer : Symbol(IStringContainer, Decl(recursiveGenericUnionType1.ts, 3, 6))
>Container : Symbol(Container, Decl(recursiveGenericUnionType1.ts, 0, 22))
}
declare module Test2 {
>Test2 : Symbol(Test2, Decl(recursiveGenericUnionType1.ts, 5, 1))
export type Container<T> = T | {
>Container : Symbol(Container, Decl(recursiveGenericUnionType1.ts, 7, 22))
>T : Symbol(T, Decl(recursiveGenericUnionType1.ts, 8, 26))
>T : Symbol(T, Decl(recursiveGenericUnionType1.ts, 8, 26))
[i: string]: Container<T>;
>i : Symbol(i, Decl(recursiveGenericUnionType1.ts, 9, 9))
>Container : Symbol(Container, Decl(recursiveGenericUnionType1.ts, 7, 22))
>T : Symbol(T, Decl(recursiveGenericUnionType1.ts, 8, 26))
};
export type IStringContainer = Container<string>;
>IStringContainer : Symbol(IStringContainer, Decl(recursiveGenericUnionType1.ts, 10, 6))
>Container : Symbol(Container, Decl(recursiveGenericUnionType1.ts, 7, 22))
}
var x: Test1.Container<number>;
>x : Symbol(x, Decl(recursiveGenericUnionType1.ts, 14, 3))
>Test1 : Symbol(Test1, Decl(recursiveGenericUnionType1.ts, 0, 0))
>Container : Symbol(Test1.Container, Decl(recursiveGenericUnionType1.ts, 0, 22))
var s1: Test1.IStringContainer;
>s1 : Symbol(s1, Decl(recursiveGenericUnionType1.ts, 16, 3))
>Test1 : Symbol(Test1, Decl(recursiveGenericUnionType1.ts, 0, 0))
>IStringContainer : Symbol(Test1.IStringContainer, Decl(recursiveGenericUnionType1.ts, 3, 6))
var s2: Test2.IStringContainer;
>s2 : Symbol(s2, Decl(recursiveGenericUnionType1.ts, 17, 3))
>Test2 : Symbol(Test2, Decl(recursiveGenericUnionType1.ts, 5, 1))
>IStringContainer : Symbol(Test2.IStringContainer, Decl(recursiveGenericUnionType1.ts, 10, 6))
s1 = s2;
>s1 : Symbol(s1, Decl(recursiveGenericUnionType1.ts, 16, 3))
>s2 : Symbol(s2, Decl(recursiveGenericUnionType1.ts, 17, 3))
s2 = s1;
>s2 : Symbol(s2, Decl(recursiveGenericUnionType1.ts, 17, 3))
>s1 : Symbol(s1, Decl(recursiveGenericUnionType1.ts, 16, 3))

View File

@ -0,0 +1,64 @@
=== tests/cases/compiler/recursiveGenericUnionType1.ts ===
declare module Test1 {
>Test1 : any
export type Container<T> = T | {
>Container : T | { [i: string]: T | any; }
>T : T
>T : T
[i: string]: Container<T>;
>i : string
>Container : T | { [i: string]: T | any; }
>T : T
};
export type IStringContainer = Container<string>;
>IStringContainer : string | { [i: string]: string | any; }
>Container : T | { [i: string]: T | any; }
}
declare module Test2 {
>Test2 : any
export type Container<T> = T | {
>Container : T | { [i: string]: T | any; }
>T : T
>T : T
[i: string]: Container<T>;
>i : string
>Container : T | { [i: string]: T | any; }
>T : T
};
export type IStringContainer = Container<string>;
>IStringContainer : string | { [i: string]: string | any; }
>Container : T | { [i: string]: T | any; }
}
var x: Test1.Container<number>;
>x : number | { [i: string]: number | any; }
>Test1 : any
>Container : T | { [i: string]: T | any; }
var s1: Test1.IStringContainer;
>s1 : string | { [i: string]: string | any; }
>Test1 : any
>IStringContainer : string | { [i: string]: string | any; }
var s2: Test2.IStringContainer;
>s2 : string | { [i: string]: string | any; }
>Test2 : any
>IStringContainer : string | { [i: string]: string | any; }
s1 = s2;
>s1 = s2 : string | { [i: string]: string | any; }
>s1 : string | { [i: string]: string | any; }
>s2 : string | { [i: string]: string | any; }
s2 = s1;
>s2 = s1 : string | { [i: string]: string | any; }
>s2 : string | { [i: string]: string | any; }
>s1 : string | { [i: string]: string | any; }

View File

@ -0,0 +1,29 @@
//// [recursiveGenericUnionType2.ts]
declare module Test1 {
export type Container<T> = T | {
[i: string]: Container<T>[];
};
export type IStringContainer = Container<string>;
}
declare module Test2 {
export type Container<T> = T | {
[i: string]: Container<T>[];
};
export type IStringContainer = Container<string>;
}
var x: Test1.Container<number>;
var s1: Test1.IStringContainer;
var s2: Test2.IStringContainer;
s1 = s2;
s2 = s1;
//// [recursiveGenericUnionType2.js]
var x;
var s1;
var s2;
s1 = s2;
s2 = s1;

View File

@ -0,0 +1,62 @@
=== tests/cases/compiler/recursiveGenericUnionType2.ts ===
declare module Test1 {
>Test1 : Symbol(Test1, Decl(recursiveGenericUnionType2.ts, 0, 0))
export type Container<T> = T | {
>Container : Symbol(Container, Decl(recursiveGenericUnionType2.ts, 0, 22))
>T : Symbol(T, Decl(recursiveGenericUnionType2.ts, 1, 26))
>T : Symbol(T, Decl(recursiveGenericUnionType2.ts, 1, 26))
[i: string]: Container<T>[];
>i : Symbol(i, Decl(recursiveGenericUnionType2.ts, 2, 9))
>Container : Symbol(Container, Decl(recursiveGenericUnionType2.ts, 0, 22))
>T : Symbol(T, Decl(recursiveGenericUnionType2.ts, 1, 26))
};
export type IStringContainer = Container<string>;
>IStringContainer : Symbol(IStringContainer, Decl(recursiveGenericUnionType2.ts, 3, 6))
>Container : Symbol(Container, Decl(recursiveGenericUnionType2.ts, 0, 22))
}
declare module Test2 {
>Test2 : Symbol(Test2, Decl(recursiveGenericUnionType2.ts, 5, 1))
export type Container<T> = T | {
>Container : Symbol(Container, Decl(recursiveGenericUnionType2.ts, 7, 22))
>T : Symbol(T, Decl(recursiveGenericUnionType2.ts, 8, 26))
>T : Symbol(T, Decl(recursiveGenericUnionType2.ts, 8, 26))
[i: string]: Container<T>[];
>i : Symbol(i, Decl(recursiveGenericUnionType2.ts, 9, 9))
>Container : Symbol(Container, Decl(recursiveGenericUnionType2.ts, 7, 22))
>T : Symbol(T, Decl(recursiveGenericUnionType2.ts, 8, 26))
};
export type IStringContainer = Container<string>;
>IStringContainer : Symbol(IStringContainer, Decl(recursiveGenericUnionType2.ts, 10, 6))
>Container : Symbol(Container, Decl(recursiveGenericUnionType2.ts, 7, 22))
}
var x: Test1.Container<number>;
>x : Symbol(x, Decl(recursiveGenericUnionType2.ts, 14, 3))
>Test1 : Symbol(Test1, Decl(recursiveGenericUnionType2.ts, 0, 0))
>Container : Symbol(Test1.Container, Decl(recursiveGenericUnionType2.ts, 0, 22))
var s1: Test1.IStringContainer;
>s1 : Symbol(s1, Decl(recursiveGenericUnionType2.ts, 16, 3))
>Test1 : Symbol(Test1, Decl(recursiveGenericUnionType2.ts, 0, 0))
>IStringContainer : Symbol(Test1.IStringContainer, Decl(recursiveGenericUnionType2.ts, 3, 6))
var s2: Test2.IStringContainer;
>s2 : Symbol(s2, Decl(recursiveGenericUnionType2.ts, 17, 3))
>Test2 : Symbol(Test2, Decl(recursiveGenericUnionType2.ts, 5, 1))
>IStringContainer : Symbol(Test2.IStringContainer, Decl(recursiveGenericUnionType2.ts, 10, 6))
s1 = s2;
>s1 : Symbol(s1, Decl(recursiveGenericUnionType2.ts, 16, 3))
>s2 : Symbol(s2, Decl(recursiveGenericUnionType2.ts, 17, 3))
s2 = s1;
>s2 : Symbol(s2, Decl(recursiveGenericUnionType2.ts, 17, 3))
>s1 : Symbol(s1, Decl(recursiveGenericUnionType2.ts, 16, 3))

View File

@ -0,0 +1,64 @@
=== tests/cases/compiler/recursiveGenericUnionType2.ts ===
declare module Test1 {
>Test1 : any
export type Container<T> = T | {
>Container : T | { [i: string]: (T | any)[]; }
>T : T
>T : T
[i: string]: Container<T>[];
>i : string
>Container : T | { [i: string]: (T | any)[]; }
>T : T
};
export type IStringContainer = Container<string>;
>IStringContainer : string | { [i: string]: (string | any)[]; }
>Container : T | { [i: string]: (T | any)[]; }
}
declare module Test2 {
>Test2 : any
export type Container<T> = T | {
>Container : T | { [i: string]: (T | any)[]; }
>T : T
>T : T
[i: string]: Container<T>[];
>i : string
>Container : T | { [i: string]: (T | any)[]; }
>T : T
};
export type IStringContainer = Container<string>;
>IStringContainer : string | { [i: string]: (string | any)[]; }
>Container : T | { [i: string]: (T | any)[]; }
}
var x: Test1.Container<number>;
>x : number | { [i: string]: (number | any)[]; }
>Test1 : any
>Container : T | { [i: string]: (T | any)[]; }
var s1: Test1.IStringContainer;
>s1 : string | { [i: string]: (string | any)[]; }
>Test1 : any
>IStringContainer : string | { [i: string]: (string | any)[]; }
var s2: Test2.IStringContainer;
>s2 : string | { [i: string]: (string | any)[]; }
>Test2 : any
>IStringContainer : string | { [i: string]: (string | any)[]; }
s1 = s2;
>s1 = s2 : string | { [i: string]: (string | any)[]; }
>s1 : string | { [i: string]: (string | any)[]; }
>s2 : string | { [i: string]: (string | any)[]; }
s2 = s1;
>s2 = s1 : string | { [i: string]: (string | any)[]; }
>s2 : string | { [i: string]: (string | any)[]; }
>s1 : string | { [i: string]: (string | any)[]; }