test/com/google/javascript/jscomp/TypeCheckTest.java
/**
   * although C1 does not declare to extend Interface1, obj2 : C1 still structurally matches obj1 :
   * Interface1 because of the structural interface matching (Interface1 is declared with @record
   * tag)
   */
although C1 does not declare to extend Interface1, obj2 : C1 still structurally matches obj1 :
Interface1 because of the structural interface matching (Interface1 is declared with @record
tag)
although C1 does not declare to extend Interface1 obj2 : C1 still structurally matches obj1 : Interface1 because of the structural interface matching ( Interface1 is declared with @record tag )
@Test
  public void testStructuralInterfaceMatching1() {
    testTypesWithExtraExterns(
        lines(
            "/** @record */",
            "function Interface1() {}",
            "/** @type {number} */",
            "Interface1.prototype.length;",
            "",
            "/** @constructor */",
            "function C1() {}",
            "/** @type {number} */",
            "C1.prototype.length;"),
        lines(
            "/** @type{Interface1} */",
            "var obj1;",
            "/** @type{C1} */",
            "var obj2 = new C1();",
            "obj1 = obj2;"));
  }
@ Test public void testStructuralInterfaceMatching1 ( ) { testTypesWithExtraExterns ( lines ( "/** @record */" , "function Interface1() {}" , "/** @type {number} */" , "Interface1.prototype.length;" , "" , "/** @constructor */" , "function C1() {}" , "/** @type {number} */" , "C1.prototype.length;" ) , lines ( "/** @type{Interface1} */" , "var obj1;" , "/** @type{C1} */" , "var obj2 = new C1();" , "obj1 = obj2;" ) ) ; }
although C1 does not declare to extend Interface1, obj2 : C1 still structurally matches obj1 :
 Interface1 because of the structural interface matching (Interface1 is declared with @record
 tag)
although C1 does not declare to extend Interface1 obj2 : C1 still structurally matches obj1 : Interface1 because of the structural interface matching ( Interface1 is declared with @record tag )