79 lines
4 KiB
Text
79 lines
4 KiB
Text
=== tests/cases/compiler/genericCallbacksAndClassHierarchy.ts ===
|
|
module M {
|
|
>M : Symbol(M, Decl(genericCallbacksAndClassHierarchy.ts, 0, 0))
|
|
|
|
export interface I<T> {
|
|
>I : Symbol(I, Decl(genericCallbacksAndClassHierarchy.ts, 0, 10))
|
|
>T : Symbol(T, Decl(genericCallbacksAndClassHierarchy.ts, 1, 23))
|
|
|
|
subscribe(callback: (newValue: T) => void ): any;
|
|
>subscribe : Symbol(subscribe, Decl(genericCallbacksAndClassHierarchy.ts, 1, 27))
|
|
>callback : Symbol(callback, Decl(genericCallbacksAndClassHierarchy.ts, 2, 18))
|
|
>newValue : Symbol(newValue, Decl(genericCallbacksAndClassHierarchy.ts, 2, 29))
|
|
>T : Symbol(T, Decl(genericCallbacksAndClassHierarchy.ts, 1, 23))
|
|
}
|
|
export class C1<T> {
|
|
>C1 : Symbol(C1, Decl(genericCallbacksAndClassHierarchy.ts, 3, 5))
|
|
>T : Symbol(T, Decl(genericCallbacksAndClassHierarchy.ts, 4, 20))
|
|
|
|
public value: I<T>;
|
|
>value : Symbol(value, Decl(genericCallbacksAndClassHierarchy.ts, 4, 24))
|
|
>I : Symbol(I, Decl(genericCallbacksAndClassHierarchy.ts, 0, 10))
|
|
>T : Symbol(T, Decl(genericCallbacksAndClassHierarchy.ts, 4, 20))
|
|
}
|
|
export class A<T> {
|
|
>A : Symbol(A, Decl(genericCallbacksAndClassHierarchy.ts, 6, 5))
|
|
>T : Symbol(T, Decl(genericCallbacksAndClassHierarchy.ts, 7, 19))
|
|
|
|
public dummy: any;
|
|
>dummy : Symbol(dummy, Decl(genericCallbacksAndClassHierarchy.ts, 7, 23))
|
|
}
|
|
export class B<T> extends C1<A<T>> { }
|
|
>B : Symbol(B, Decl(genericCallbacksAndClassHierarchy.ts, 9, 5))
|
|
>T : Symbol(T, Decl(genericCallbacksAndClassHierarchy.ts, 10, 19))
|
|
>C1 : Symbol(C1, Decl(genericCallbacksAndClassHierarchy.ts, 3, 5))
|
|
>A : Symbol(A, Decl(genericCallbacksAndClassHierarchy.ts, 6, 5))
|
|
>T : Symbol(T, Decl(genericCallbacksAndClassHierarchy.ts, 10, 19))
|
|
|
|
export class D<T> {
|
|
>D : Symbol(D, Decl(genericCallbacksAndClassHierarchy.ts, 10, 42))
|
|
>T : Symbol(T, Decl(genericCallbacksAndClassHierarchy.ts, 11, 19))
|
|
|
|
_subscribe(viewModel: B<T>): void {
|
|
>_subscribe : Symbol(_subscribe, Decl(genericCallbacksAndClassHierarchy.ts, 11, 23))
|
|
>viewModel : Symbol(viewModel, Decl(genericCallbacksAndClassHierarchy.ts, 12, 19))
|
|
>B : Symbol(B, Decl(genericCallbacksAndClassHierarchy.ts, 9, 5))
|
|
>T : Symbol(T, Decl(genericCallbacksAndClassHierarchy.ts, 11, 19))
|
|
|
|
var f = (newValue: A<T>) => { };
|
|
>f : Symbol(f, Decl(genericCallbacksAndClassHierarchy.ts, 13, 15))
|
|
>newValue : Symbol(newValue, Decl(genericCallbacksAndClassHierarchy.ts, 13, 21))
|
|
>A : Symbol(A, Decl(genericCallbacksAndClassHierarchy.ts, 6, 5))
|
|
>T : Symbol(T, Decl(genericCallbacksAndClassHierarchy.ts, 11, 19))
|
|
|
|
var v: I<A<T>> = viewModel.value;
|
|
>v : Symbol(v, Decl(genericCallbacksAndClassHierarchy.ts, 15, 15))
|
|
>I : Symbol(I, Decl(genericCallbacksAndClassHierarchy.ts, 0, 10))
|
|
>A : Symbol(A, Decl(genericCallbacksAndClassHierarchy.ts, 6, 5))
|
|
>T : Symbol(T, Decl(genericCallbacksAndClassHierarchy.ts, 11, 19))
|
|
>viewModel.value : Symbol(C1.value, Decl(genericCallbacksAndClassHierarchy.ts, 4, 24))
|
|
>viewModel : Symbol(viewModel, Decl(genericCallbacksAndClassHierarchy.ts, 12, 19))
|
|
>value : Symbol(C1.value, Decl(genericCallbacksAndClassHierarchy.ts, 4, 24))
|
|
|
|
// both of these should work
|
|
v.subscribe(f);
|
|
>v.subscribe : Symbol(I.subscribe, Decl(genericCallbacksAndClassHierarchy.ts, 1, 27))
|
|
>v : Symbol(v, Decl(genericCallbacksAndClassHierarchy.ts, 15, 15))
|
|
>subscribe : Symbol(I.subscribe, Decl(genericCallbacksAndClassHierarchy.ts, 1, 27))
|
|
>f : Symbol(f, Decl(genericCallbacksAndClassHierarchy.ts, 13, 15))
|
|
|
|
v.subscribe((newValue: A<T>) => { });
|
|
>v.subscribe : Symbol(I.subscribe, Decl(genericCallbacksAndClassHierarchy.ts, 1, 27))
|
|
>v : Symbol(v, Decl(genericCallbacksAndClassHierarchy.ts, 15, 15))
|
|
>subscribe : Symbol(I.subscribe, Decl(genericCallbacksAndClassHierarchy.ts, 1, 27))
|
|
>newValue : Symbol(newValue, Decl(genericCallbacksAndClassHierarchy.ts, 19, 25))
|
|
>A : Symbol(A, Decl(genericCallbacksAndClassHierarchy.ts, 6, 5))
|
|
>T : Symbol(T, Decl(genericCallbacksAndClassHierarchy.ts, 11, 19))
|
|
}
|
|
}
|
|
}
|