third_party/closure-compiler/src/test/com/google/javascript/jscomp/TypedScopeCreatorTest.java
/**
   * Note: these tests expect the parameters to have inferred, not declared, types because of the
   * order in which scope creation & named type resolution happens.
   *
   * <p>See also b/118710352
   */
these tests expect the parameters to have inferred, not declared, types because of the
order in which scope creation & named type resolution happens.


these tests expect the parameters to have inferred not declared types because of the order in which scope creation & named type resolution happens .
@Test
  public void testObjectPatternParameter_withUnresolvedForwardDeclaredType_isInferred() {
    test(
        srcs(
            lines(
                "goog.forwardDeclare('SomeUnknownName');",
                "/** @param {!SomeUnknownName} obj */ function f({a}) {}")),
        warning(RhinoErrorReporter.UNRECOGNIZED_TYPE_ERROR));
    TypedVar aVar = checkNotNull(lastFunctionScope.getVar("a"));
    assertType(aVar.getType()).toStringIsEqualTo("?");
    assertThat(aVar.isTypeInferred()).isTrue();
  }
@ Test public void testObjectPatternParameter_withUnresolvedForwardDeclaredType_isInferred ( ) { test ( srcs ( lines ( "goog.forwardDeclare('SomeUnknownName');" , "/** @param {!SomeUnknownName} obj */ function f({a}) {}" ) ) , warning ( RhinoErrorReporter . UNRECOGNIZED_TYPE_ERROR ) ) ; TypedVar aVar = checkNotNull ( lastFunctionScope . getVar ( "a" ) ) ; assertType ( aVar . getType ( ) ) . toStringIsEqualTo ( "?" ) ; assertThat ( aVar . isTypeInferred ( ) ) . isTrue ( ) ; }
Note: these tests expect the parameters to have inferred, not declared, types because of the
 order in which scope creation & named type resolution happens.
Note : these tests expect the parameters to have inferred not declared types because of the order in which scope creation & named type resolution happens .
// Note that this only emits one UNRECOGNIZED_TYPE_ERROR for SomeUnknownName. We don't emit // an error for SomeUnknownName#a, as that would be redundant.