TypeScript/tests/baselines/reference/listFailure.types
2015-04-15 16:44:20 -07:00

130 lines
2.5 KiB
Plaintext

=== tests/cases/compiler/listFailure.ts ===
module Editor {
>Editor : typeof Editor
export class Buffer {
>Buffer : Buffer
lines: List<Line> = ListMakeHead<Line>();
>lines : List<Line>
>List : List<T>
>Line : Line
>ListMakeHead<Line>() : List<Line>
>ListMakeHead : <U>() => List<U>
>Line : Line
addLine(lineText: string): List<Line> {
>addLine : (lineText: string) => List<Line>
>lineText : string
>List : List<T>
>Line : Line
var line: Line = new Line();
>line : Line
>Line : Line
>new Line() : Line
>Line : typeof Line
var lineEntry = this.lines.add(line);
>lineEntry : List<Line>
>this.lines.add(line) : List<Line>
>this.lines.add : (data: Line) => List<Line>
>this.lines : List<Line>
>this : Buffer
>lines : List<Line>
>add : (data: Line) => List<Line>
>line : Line
return lineEntry;
>lineEntry : List<Line>
}
}
export function ListRemoveEntry<U>(entry: List<U>): List<U> {
>ListRemoveEntry : <U>(entry: List<U>) => List<U>
>U : U
>entry : List<U>
>List : List<T>
>U : U
>List : List<T>
>U : U
return entry;
>entry : List<U>
}
export function ListMakeHead<U>(): List<U> {
>ListMakeHead : <U>() => List<U>
>U : U
>List : List<T>
>U : U
return null;
>null : null
}
export function ListMakeEntry<U>(data: U): List<U> {
>ListMakeEntry : <U>(data: U) => List<U>
>U : U
>data : U
>U : U
>List : List<T>
>U : U
return null;
>null : null
}
class List<T> {
>List : List<T>
>T : T
public next: List<T>;
>next : List<T>
>List : List<T>
>T : T
add(data: T): List<T> {
>add : (data: T) => List<T>
>data : T
>T : T
>List : List<T>
>T : T
this.next = ListMakeEntry(data);
>this.next = ListMakeEntry(data) : List<T>
>this.next : List<T>
>this : List<T>
>next : List<T>
>ListMakeEntry(data) : List<T>
>ListMakeEntry : <U>(data: U) => List<U>
>data : T
return this.next;
>this.next : List<T>
>this : List<T>
>next : List<T>
}
popEntry(head: List<T>): List<T> {
>popEntry : (head: List<T>) => List<T>
>head : List<T>
>List : List<T>
>T : T
>List : List<T>
>T : T
return (ListRemoveEntry(this.next));
>(ListRemoveEntry(this.next)) : List<T>
>ListRemoveEntry(this.next) : List<T>
>ListRemoveEntry : <U>(entry: List<U>) => List<U>
>this.next : List<T>
>this : List<T>
>next : List<T>
}
}
export class Line {}
>Line : Line
}