src/com/google/javascript/jscomp/TypeCheck.java
/**
   * Visits a GETPROP node.
   *
   * @param t The node traversal object that supplies context, such as the scope chain to use in
   *     name lookups as well as error reporting.
   * @param n The node being visited.
   */
Visits a GETPROP node.
@param t The node traversal object that supplies context, such as the scope chain to use in
name lookups as well as error reporting.
@param n The node being visited.
Visits a GETPROP node . @param t The node traversal object that supplies context such as the scope chain to use in name lookups as well as error reporting . @param n The node being visited .
private void visitGetProp(NodeTraversal t, Node n) {
    Node property = n.getLastChild();
    Node objNode = n.getFirstChild();
    JSType childType = getJSType(objNode);
    if (childType.isDict()) {
      report(t, property, TypeValidator.ILLEGAL_PROPERTY_ACCESS, "'.'", "dict");
    } else if (validator.expectNotNullOrUndefined(t, n, childType,
        "No properties on this expression", getNativeType(OBJECT_TYPE))) {
      checkPropertyAccessForGetProp(t, n);
    }
    ensureTyped(n);
  }
private void visitGetProp ( NodeTraversal t , Node n ) { Node property = n . getLastChild ( ) ; Node objNode = n . getFirstChild ( ) ; JSType childType = getJSType ( objNode ) ; if ( childType . isDict ( ) ) { report ( t , property , TypeValidator . ILLEGAL_PROPERTY_ACCESS , "'.'" , "dict" ) ; } else if ( validator . expectNotNullOrUndefined ( t , n , childType , "No properties on this expression" , getNativeType ( OBJECT_TYPE ) ) ) { checkPropertyAccessForGetProp ( t , n ) ; } ensureTyped ( n ) ; }
Visits a GETPROP node.
Visits a GETPROP node .
// obj.prop or obj.method() // Lots of types can appear on the left, a call to a void function can // never be on the left. getPropertyType will decide what is acceptable // and what isn't.