=== tests/cases/compiler/genericOfACloduleType1.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(); >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 } var g2 = new G() // was: error Type reference cannot refer to container 'M.C'. >g2 : G >new G() : G >G : typeof G >M : any >C : M.C