}
if (curr.head.getTag() == Tag.METHODDEF) {
JCMethodDecl method = (JCMethodDecl)curr.head;
return method.params.indexOf(param);
} else if (curr.head.getTag() == Tag.LAMBDA) {
JCLambda lambda = (JCLambda)curr.head;
return lambda.params.indexOf(param);
} else {
Assert.error("methodParamIndex expected to find method or lambda for param: " + param);
return -1;
}