test/com/google/javascript/jscomp/TypeCheckTest.java
/** Verify that templatized interfaces can extend one another and share template values. */
Verify that templatized interfaces can extend one another and share template values.
Verify that templatized interfaces can extend one another and share template values .
@Test
  public void testInterfaceInheritanceCheck14() {
    testTypes(
        "/** @interface\n @template T */function A() {};" +
        "/** @return {T} */A.prototype.foo = function() {};" +
        "/** @interface\n @template U\n @extends {A<U>} */function B() {};" +
        "/** @return {U} */B.prototype.bar = function() {};" +
        "/** @constructor\n @implements {B<string>} */function C() {};" +
        "/** @return {string}\n @override */C.prototype.foo = function() {};" +
        "/** @return {string}\n @override */C.prototype.bar = function() {};");
  }
@ Test public void testInterfaceInheritanceCheck14 ( ) { testTypes ( "/** @interface\n @template T */function A() {};" + "/** @return {T} */A.prototype.foo = function() {};" + "/** @interface\n @template U\n @extends {A<U>} */function B() {};" + "/** @return {U} */B.prototype.bar = function() {};" + "/** @constructor\n @implements {B<string>} */function C() {};" + "/** @return {string}\n @override */C.prototype.foo = function() {};" + "/** @return {string}\n @override */C.prototype.bar = function() {};" ) ; }
Verify that templatized interfaces can extend one another and share template values.
Verify that templatized interfaces can extend one another and share template values .