315
320
* @param indexType The type inside the brackets of the GETELEM.
317
322
void expectIndexMatch(NodeTraversal t, Node n, JSType objType,
319
324
Preconditions.checkState(n.isGetElem());
320
325
Node indexNode = n.getLastChild();
321
330
if (objType.isUnknownType()) {
322
331
expectStringOrNumber(t, indexNode, indexType, "property access");