TypeScript/tests/baselines/reference/constraintCheckInGenericBaseTypeReference.types
2015-04-13 14:29:37 -07:00

45 lines
2.3 KiB
Plaintext

=== tests/cases/compiler/constraintCheckInGenericBaseTypeReference.ts ===
// No errors
class Constraint {
>Constraint : Constraint, Symbol(Constraint, Decl(constraintCheckInGenericBaseTypeReference.ts, 0, 0))
public method() { }
>method : () => void, Symbol(method, Decl(constraintCheckInGenericBaseTypeReference.ts, 1, 18))
}
class GenericBase<T extends Constraint> {
>GenericBase : GenericBase<T>, Symbol(GenericBase, Decl(constraintCheckInGenericBaseTypeReference.ts, 3, 1))
>T : T, Symbol(T, Decl(constraintCheckInGenericBaseTypeReference.ts, 4, 18))
>Constraint : Constraint, Symbol(Constraint, Decl(constraintCheckInGenericBaseTypeReference.ts, 0, 0))
public items: any;
>items : any, Symbol(items, Decl(constraintCheckInGenericBaseTypeReference.ts, 4, 41))
}
class Derived extends GenericBase<TypeArg> {
>Derived : Derived, Symbol(Derived, Decl(constraintCheckInGenericBaseTypeReference.ts, 6, 1))
>GenericBase : GenericBase<T>, Symbol(GenericBase, Decl(constraintCheckInGenericBaseTypeReference.ts, 3, 1))
>TypeArg : TypeArg, Symbol(TypeArg, Decl(constraintCheckInGenericBaseTypeReference.ts, 9, 1))
}
class TypeArg {
>TypeArg : TypeArg, Symbol(TypeArg, Decl(constraintCheckInGenericBaseTypeReference.ts, 9, 1))
public method() {
>method : () => void, Symbol(method, Decl(constraintCheckInGenericBaseTypeReference.ts, 10, 15))
Container.People.items;
>Container.People.items : any, Symbol(GenericBase.items, Decl(constraintCheckInGenericBaseTypeReference.ts, 4, 41))
>Container.People : Derived, Symbol(Container.People, Decl(constraintCheckInGenericBaseTypeReference.ts, 16, 17))
>Container : typeof Container, Symbol(Container, Decl(constraintCheckInGenericBaseTypeReference.ts, 14, 1))
>People : Derived, Symbol(Container.People, Decl(constraintCheckInGenericBaseTypeReference.ts, 16, 17))
>items : any, Symbol(GenericBase.items, Decl(constraintCheckInGenericBaseTypeReference.ts, 4, 41))
}
}
class Container {
>Container : Container, Symbol(Container, Decl(constraintCheckInGenericBaseTypeReference.ts, 14, 1))
public static People: Derived
>People : Derived, Symbol(Container.People, Decl(constraintCheckInGenericBaseTypeReference.ts, 16, 17))
>Derived : Derived, Symbol(Derived, Decl(constraintCheckInGenericBaseTypeReference.ts, 6, 1))
}