test/com/google/javascript/jscomp/TypeCheckTest.java
/** Verify that templatized interfaces enforce their template type values. */
Verify that templatized interfaces enforce their template type values.
Verify that templatized interfaces enforce their template type values .
@Test
  public void testInterfacePropertyNotImplemented3() {
    testTypes(
        "/** @interface\n @template T */function Int() {};"
            + "/** @return {T} */Int.prototype.foo = function() {};"
            + "/** @constructor\n @implements {Int<string>} */function Foo() {};"
            + "/** @return {number}\n @override */Foo.prototype.foo = function() {};",
        "mismatch of the foo property on type Foo and the type of the property it "
            + "overrides from interface Int\n"
            + "original: function(this:Int): string\n"
            + "override: function(this:Foo): number");
  }
@ Test public void testInterfacePropertyNotImplemented3 ( ) { testTypes ( "/** @interface\n @template T */function Int() {};" + "/** @return {T} */Int.prototype.foo = function() {};" + "/** @constructor\n @implements {Int<string>} */function Foo() {};" + "/** @return {number}\n @override */Foo.prototype.foo = function() {};" , "mismatch of the foo property on type Foo and the type of the property it " + "overrides from interface Int\n" + "original: function(this:Int): string\n" + "override: function(this:Foo): number" ) ; }
Verify that templatized interfaces enforce their template type values.
Verify that templatized interfaces enforce their template type values .