=== tests/cases/compiler/genericOfACloduleType2.ts === class G{ bar(x: T) { return x; } } >G : G >T : T >bar : (x: T) => T >x : T >T : T >x : T module M { >M : typeof M export class C { foo() { } } >C : C >foo : () => void export module C { >C : typeof C export class X { >X : X } } var g1 = new G(); >g1 : G >new G() : G >G : typeof G >C : C g1.bar(null).foo(); // no error >g1.bar(null).foo() : void >g1.bar(null).foo : () => void >g1.bar(null) : C >g1.bar : (x: C) => C >g1 : G >bar : (x: C) => C >null : null >foo : () => void } module N { >N : typeof N var g2 = new G() >g2 : G >new G() : G >G : typeof G >M : any >C : M.C }