class G{ bar(x: T) { return x; } } module M { export class C { foo() { } } export module C { export class X { } } var g1 = new G(); g1.bar(null).foo(); } var g2 = new G() // was: error Type reference cannot refer to container 'M.C'.