124 lines
5.9 KiB
Plaintext
124 lines
5.9 KiB
Plaintext
=== tests/cases/compiler/complexClassRelationships.ts ===
|
|
// There should be no errors in this file
|
|
class Derived extends Base {
|
|
>Derived : Derived, Symbol(Derived, Decl(complexClassRelationships.ts, 0, 0))
|
|
>Base : Base, Symbol(Base, Decl(complexClassRelationships.ts, 11, 1))
|
|
|
|
public static createEmpty(): Derived {
|
|
>createEmpty : () => Derived, Symbol(Derived.createEmpty, Decl(complexClassRelationships.ts, 1, 28))
|
|
>Derived : Derived, Symbol(Derived, Decl(complexClassRelationships.ts, 0, 0))
|
|
|
|
var item = new Derived();
|
|
>item : Derived, Symbol(item, Decl(complexClassRelationships.ts, 3, 11))
|
|
>new Derived() : Derived
|
|
>Derived : typeof Derived, Symbol(Derived, Decl(complexClassRelationships.ts, 0, 0))
|
|
|
|
return item;
|
|
>item : Derived, Symbol(item, Decl(complexClassRelationships.ts, 3, 11))
|
|
}
|
|
}
|
|
class BaseCollection<T extends Base> {
|
|
>BaseCollection : BaseCollection<T>, Symbol(BaseCollection, Decl(complexClassRelationships.ts, 6, 1))
|
|
>T : T, Symbol(T, Decl(complexClassRelationships.ts, 7, 21))
|
|
>Base : Base, Symbol(Base, Decl(complexClassRelationships.ts, 11, 1))
|
|
|
|
constructor(f: () => T) {
|
|
>f : () => T, Symbol(f, Decl(complexClassRelationships.ts, 8, 16))
|
|
>T : T, Symbol(T, Decl(complexClassRelationships.ts, 7, 21))
|
|
|
|
(item: Thing) => { return [item.Components]; };
|
|
>(item: Thing) => { return [item.Components]; } : (item: Thing) => ComponentCollection<any>[]
|
|
>item : Thing, Symbol(item, Decl(complexClassRelationships.ts, 9, 9))
|
|
>Thing : Thing, Symbol(Thing, Decl(complexClassRelationships.ts, 14, 1))
|
|
>[item.Components] : ComponentCollection<any>[]
|
|
>item.Components : ComponentCollection<any>, Symbol(Thing.Components, Decl(complexClassRelationships.ts, 16, 13))
|
|
>item : Thing, Symbol(item, Decl(complexClassRelationships.ts, 9, 9))
|
|
>Components : ComponentCollection<any>, Symbol(Thing.Components, Decl(complexClassRelationships.ts, 16, 13))
|
|
}
|
|
}
|
|
class Base {
|
|
>Base : Base, Symbol(Base, Decl(complexClassRelationships.ts, 11, 1))
|
|
|
|
ownerCollection: BaseCollection<Base>;
|
|
>ownerCollection : BaseCollection<Base>, Symbol(ownerCollection, Decl(complexClassRelationships.ts, 12, 12))
|
|
>BaseCollection : BaseCollection<T>, Symbol(BaseCollection, Decl(complexClassRelationships.ts, 6, 1))
|
|
>Base : Base, Symbol(Base, Decl(complexClassRelationships.ts, 11, 1))
|
|
}
|
|
|
|
class Thing {
|
|
>Thing : Thing, Symbol(Thing, Decl(complexClassRelationships.ts, 14, 1))
|
|
|
|
public get Components(): ComponentCollection<any> { return null }
|
|
>Components : ComponentCollection<any>, Symbol(Components, Decl(complexClassRelationships.ts, 16, 13))
|
|
>ComponentCollection : ComponentCollection<T>, Symbol(ComponentCollection, Decl(complexClassRelationships.ts, 18, 1))
|
|
>null : null
|
|
}
|
|
|
|
class ComponentCollection<T> {
|
|
>ComponentCollection : ComponentCollection<T>, Symbol(ComponentCollection, Decl(complexClassRelationships.ts, 18, 1))
|
|
>T : T, Symbol(T, Decl(complexClassRelationships.ts, 20, 26))
|
|
|
|
private static sortComponents(p: Foo) {
|
|
>sortComponents : (p: Foo) => GenericType<string>, Symbol(ComponentCollection.sortComponents, Decl(complexClassRelationships.ts, 20, 30))
|
|
>p : Foo, Symbol(p, Decl(complexClassRelationships.ts, 21, 34))
|
|
>Foo : Foo, Symbol(Foo, Decl(complexClassRelationships.ts, 24, 1))
|
|
|
|
return p.prop1;
|
|
>p.prop1 : GenericType<string>, Symbol(Foo.prop1, Decl(complexClassRelationships.ts, 26, 11))
|
|
>p : Foo, Symbol(p, Decl(complexClassRelationships.ts, 21, 34))
|
|
>prop1 : GenericType<string>, Symbol(Foo.prop1, Decl(complexClassRelationships.ts, 26, 11))
|
|
}
|
|
}
|
|
|
|
class Foo {
|
|
>Foo : Foo, Symbol(Foo, Decl(complexClassRelationships.ts, 24, 1))
|
|
|
|
public get prop1() {
|
|
>prop1 : GenericType<string>, Symbol(prop1, Decl(complexClassRelationships.ts, 26, 11))
|
|
|
|
return new GenericType<string>(this);
|
|
>new GenericType<string>(this) : GenericType<string>
|
|
>GenericType : typeof GenericType, Symbol(GenericType, Decl(complexClassRelationships.ts, 36, 1))
|
|
>this : Foo, Symbol(Foo, Decl(complexClassRelationships.ts, 24, 1))
|
|
}
|
|
public populate() {
|
|
>populate : () => void, Symbol(populate, Decl(complexClassRelationships.ts, 29, 5))
|
|
|
|
this.prop2;
|
|
>this.prop2 : BaseCollection<Derived>, Symbol(prop2, Decl(complexClassRelationships.ts, 32, 5))
|
|
>this : Foo, Symbol(Foo, Decl(complexClassRelationships.ts, 24, 1))
|
|
>prop2 : BaseCollection<Derived>, Symbol(prop2, Decl(complexClassRelationships.ts, 32, 5))
|
|
}
|
|
public get prop2(): BaseCollection<Derived> {
|
|
>prop2 : BaseCollection<Derived>, Symbol(prop2, Decl(complexClassRelationships.ts, 32, 5))
|
|
>BaseCollection : BaseCollection<T>, Symbol(BaseCollection, Decl(complexClassRelationships.ts, 6, 1))
|
|
>Derived : Derived, Symbol(Derived, Decl(complexClassRelationships.ts, 0, 0))
|
|
|
|
return new BaseCollection<Derived>(Derived.createEmpty);
|
|
>new BaseCollection<Derived>(Derived.createEmpty) : BaseCollection<Derived>
|
|
>BaseCollection : typeof BaseCollection, Symbol(BaseCollection, Decl(complexClassRelationships.ts, 6, 1))
|
|
>Derived : Derived, Symbol(Derived, Decl(complexClassRelationships.ts, 0, 0))
|
|
>Derived.createEmpty : () => Derived, Symbol(Derived.createEmpty, Decl(complexClassRelationships.ts, 1, 28))
|
|
>Derived : typeof Derived, Symbol(Derived, Decl(complexClassRelationships.ts, 0, 0))
|
|
>createEmpty : () => Derived, Symbol(Derived.createEmpty, Decl(complexClassRelationships.ts, 1, 28))
|
|
}
|
|
}
|
|
|
|
class GenericType<T> {
|
|
>GenericType : GenericType<T>, Symbol(GenericType, Decl(complexClassRelationships.ts, 36, 1))
|
|
>T : T, Symbol(T, Decl(complexClassRelationships.ts, 38, 18))
|
|
|
|
constructor(parent: FooBase) { }
|
|
>parent : FooBase, Symbol(parent, Decl(complexClassRelationships.ts, 39, 16))
|
|
>FooBase : FooBase, Symbol(FooBase, Decl(complexClassRelationships.ts, 40, 1))
|
|
}
|
|
|
|
class FooBase {
|
|
>FooBase : FooBase, Symbol(FooBase, Decl(complexClassRelationships.ts, 40, 1))
|
|
|
|
public populate() {
|
|
>populate : () => void, Symbol(populate, Decl(complexClassRelationships.ts, 42, 15))
|
|
|
|
}
|
|
}
|