TypeScript/tests/baselines/reference/memberVariableDeclarations1.types

90 lines
3.5 KiB
Plaintext
Raw Normal View History

2014-08-15 23:33:16 +02:00
=== tests/cases/compiler/memberVariableDeclarations1.ts ===
// from spec
class Employee {
2015-04-13 23:01:57 +02:00
>Employee : Employee, Symbol(Employee, Decl(memberVariableDeclarations1.ts, 0, 0))
2014-08-15 23:33:16 +02:00
public name: string;
2015-04-13 23:01:57 +02:00
>name : string, Symbol(name, Decl(memberVariableDeclarations1.ts, 2, 16))
2014-08-15 23:33:16 +02:00
public address: string;
2015-04-13 23:01:57 +02:00
>address : string, Symbol(address, Decl(memberVariableDeclarations1.ts, 3, 24))
2014-08-15 23:33:16 +02:00
public retired = false;
2015-04-13 23:01:57 +02:00
>retired : boolean, Symbol(retired, Decl(memberVariableDeclarations1.ts, 4, 27))
2015-04-13 21:36:11 +02:00
>false : boolean
2014-08-15 23:33:16 +02:00
public manager: Employee = null;
2015-04-13 23:01:57 +02:00
>manager : Employee, Symbol(manager, Decl(memberVariableDeclarations1.ts, 5, 27))
>Employee : Employee, Symbol(Employee, Decl(memberVariableDeclarations1.ts, 0, 0))
2015-04-13 21:36:11 +02:00
>null : null
2014-08-15 23:33:16 +02:00
public reports: Employee[] = [];
2015-04-13 23:01:57 +02:00
>reports : Employee[], Symbol(reports, Decl(memberVariableDeclarations1.ts, 6, 36))
>Employee : Employee, Symbol(Employee, Decl(memberVariableDeclarations1.ts, 0, 0))
2014-10-13 15:56:58 +02:00
>[] : undefined[]
2014-08-15 23:33:16 +02:00
}
class Employee2 {
2015-04-13 23:01:57 +02:00
>Employee2 : Employee2, Symbol(Employee2, Decl(memberVariableDeclarations1.ts, 8, 1))
2014-08-15 23:33:16 +02:00
public name: string;
2015-04-13 23:01:57 +02:00
>name : string, Symbol(name, Decl(memberVariableDeclarations1.ts, 10, 17))
2014-08-15 23:33:16 +02:00
public address: string;
2015-04-13 23:01:57 +02:00
>address : string, Symbol(address, Decl(memberVariableDeclarations1.ts, 11, 24))
2014-08-15 23:33:16 +02:00
public retired: boolean;
2015-04-13 23:01:57 +02:00
>retired : boolean, Symbol(retired, Decl(memberVariableDeclarations1.ts, 12, 27))
2014-08-15 23:33:16 +02:00
public manager: Employee;
2015-04-13 23:01:57 +02:00
>manager : Employee, Symbol(manager, Decl(memberVariableDeclarations1.ts, 13, 28))
>Employee : Employee, Symbol(Employee, Decl(memberVariableDeclarations1.ts, 0, 0))
2014-08-15 23:33:16 +02:00
public reports: Employee[];
2015-04-13 23:01:57 +02:00
>reports : Employee[], Symbol(reports, Decl(memberVariableDeclarations1.ts, 14, 29))
>Employee : Employee, Symbol(Employee, Decl(memberVariableDeclarations1.ts, 0, 0))
2014-08-15 23:33:16 +02:00
constructor() {
this.retired = false;
>this.retired = false : boolean
2015-04-13 23:01:57 +02:00
>this.retired : boolean, Symbol(retired, Decl(memberVariableDeclarations1.ts, 12, 27))
>this : Employee2, Symbol(Employee2, Decl(memberVariableDeclarations1.ts, 8, 1))
>retired : boolean, Symbol(retired, Decl(memberVariableDeclarations1.ts, 12, 27))
2015-04-13 21:36:11 +02:00
>false : boolean
2014-08-15 23:33:16 +02:00
this.manager = null;
>this.manager = null : null
2015-04-13 23:01:57 +02:00
>this.manager : Employee, Symbol(manager, Decl(memberVariableDeclarations1.ts, 13, 28))
>this : Employee2, Symbol(Employee2, Decl(memberVariableDeclarations1.ts, 8, 1))
>manager : Employee, Symbol(manager, Decl(memberVariableDeclarations1.ts, 13, 28))
2015-04-13 21:36:11 +02:00
>null : null
2014-08-15 23:33:16 +02:00
this.reports = [];
2014-10-13 15:56:58 +02:00
>this.reports = [] : undefined[]
2015-04-13 23:01:57 +02:00
>this.reports : Employee[], Symbol(reports, Decl(memberVariableDeclarations1.ts, 14, 29))
>this : Employee2, Symbol(Employee2, Decl(memberVariableDeclarations1.ts, 8, 1))
>reports : Employee[], Symbol(reports, Decl(memberVariableDeclarations1.ts, 14, 29))
2014-10-13 15:56:58 +02:00
>[] : undefined[]
2014-08-15 23:33:16 +02:00
}
}
var e1: Employee;
2015-04-13 23:01:57 +02:00
>e1 : Employee, Symbol(e1, Decl(memberVariableDeclarations1.ts, 23, 3))
>Employee : Employee, Symbol(Employee, Decl(memberVariableDeclarations1.ts, 0, 0))
2014-08-15 23:33:16 +02:00
var e2: Employee2;
2015-04-13 23:01:57 +02:00
>e2 : Employee2, Symbol(e2, Decl(memberVariableDeclarations1.ts, 24, 3))
>Employee2 : Employee2, Symbol(Employee2, Decl(memberVariableDeclarations1.ts, 8, 1))
2014-08-15 23:33:16 +02:00
e1 = e2;
>e1 = e2 : Employee2
2015-04-13 23:01:57 +02:00
>e1 : Employee, Symbol(e1, Decl(memberVariableDeclarations1.ts, 23, 3))
>e2 : Employee2, Symbol(e2, Decl(memberVariableDeclarations1.ts, 24, 3))
2014-08-15 23:33:16 +02:00
e2 = e1;
>e2 = e1 : Employee
2015-04-13 23:01:57 +02:00
>e2 : Employee2, Symbol(e2, Decl(memberVariableDeclarations1.ts, 24, 3))
>e1 : Employee, Symbol(e1, Decl(memberVariableDeclarations1.ts, 23, 3))
2014-08-15 23:33:16 +02:00