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