test/com/google/javascript/jscomp/TypeCheckTest.java
// These test the template types in the built-in Iterator/Iterable/Generator are set up correctly
These test the template types in the built-in Iterator/Iterable/Generator are set up correctly
These test the template types in the built - in Iterator / Iterable / Generator are set up correctly
@Test
  public void testIteratorAccess1() {
    testTypesWithCommonExterns(
        lines(
            "/** ",
            " * @param {!Iterator<T>} x",
            " * @return {T}",
            " * @template T",
            "*/",
            "function f(x) { return x[0]; }",
            "function g(/** !Generator<string> */ x) {",
            "  var /** null */ y = f(x);",
            "}"),
        "initializing variable\n" + "found   : string\n" + "required: null");
  }
@ Test public void testIteratorAccess1 ( ) { testTypesWithCommonExterns ( lines ( "/** " , " * @param {!Iterator<T>} x" , " * @return {T}" , " * @template T" , "*/" , "function f(x) { return x[0]; }" , "function g(/** !Generator<string> */ x) {" , "  var /** null */ y = f(x);" , "}" ) , "initializing variable\n" + "found   : string\n" + "required: null" ) ; }
These test the template types in the built-in Iterator/Iterable/Generator are set up correctly
These test the template types in the built - in Iterator / Iterable / Generator are set up correctly