==== tests/cases/conformance/types/typeParameters/typeParameterLists/propertyAccessOnTypeParameterWithConstraints5.ts (6 errors) ==== class A { foo(): string { return ''; } } class B extends A { bar(): string { return ''; } } class C { ~~~~~~~~~~~ !!! Constraint of a type parameter cannot reference any type parameter from the same type parameter list. f() { var x: U; var a = x['foo'](); // should be string return a + x.foo() + x.notHere(); } } var r = (new C()).f(); interface I { ~~~~~~~~~~~ !!! Constraint of a type parameter cannot reference any type parameter from the same type parameter list. foo: U; } var i: I; var r2 = i.foo.notHere(); ~~~~~~~ !!! Property 'notHere' does not exist on type 'B'. var r2b = i.foo['foo'](); var a: { (): U; ~~~~~~~~~~~ !!! Constraint of a type parameter cannot reference any type parameter from the same type parameter list. } // BUG 794164 var r3: string = a().notHere(); ~~~~~~~ !!! Property 'notHere' does not exist on type '{}'. var r3b: string = a()['foo'](); var b = { foo: (x: U): U => { ~~~~~~~~~~~ !!! Constraint of a type parameter cannot reference any type parameter from the same type parameter list. var a = x['foo'](); // should be string return a + x.notHere(); }, // BUG 794164 bar: b.foo(1).notHere() } var r4 = b.foo(new B()); // error after constraints above made illegal, doesn't matter