test/com/google/javascript/jscomp/TypeCheckTest.java
/**
   * Type checks a NAME node and retrieve its type.
   */
Type checks a NAME node and retrieve its type.
Type checks a NAME node and retrieve its type .
private JSType testNameNode(String name) {
    Node node = Node.newString(Token.NAME, name);
    Node parent = new Node(Token.SCRIPT, node);
    parent.setInputId(new InputId("code"));
    Node externs = new Node(Token.SCRIPT);
    externs.setInputId(new InputId("externs"));
    IR.root(externs, parent);
    makeTypeCheck().processForTesting(null, parent);
    return node.getJSType();
  }
private JSType testNameNode ( String name ) { Node node = Node . newString ( Token . NAME , name ) ; Node parent = new Node ( Token . SCRIPT , node ) ; parent . setInputId ( new InputId ( "code" ) ) ; Node externs = new Node ( Token . SCRIPT ) ; externs . setInputId ( new InputId ( "externs" ) ) ; IR . root ( externs , parent ) ; makeTypeCheck ( ) . processForTesting ( null , parent ) ; return node . getJSType ( ) ; }
Type checks a NAME node and retrieve its type.
Type checks a NAME node and retrieve its type .