use of org.eclipse.ceylon.langtools.tools.javac.tree.JCTree.JCVariableDecl in project ceylon by eclipse.
the class NamedArgumentInvocation method appendDefaulted.
private final void appendDefaulted(Parameter param, JCExpression argExpr) {
// we can't just generate types like Foo<?> if the target type param is not raw because the bounds will
// not match, so we go raw
int flags = JT_RAW;
if (getNamedParameterBoxingStrategy(param) == BoxingStrategy.BOXED) {
flags |= JT_TYPE_ARGUMENT;
}
Type type = gen.getTypeForParameter(param, producedReference, AbstractTransformer.TP_TO_BOUND);
Naming.SyntheticName argName = argName(param);
JCExpression typeExpr = gen.makeJavaType(type, flags);
JCVariableDecl varDecl = gen.makeVar(argName, typeExpr, argExpr);
bind(param, argName, gen.makeJavaType(type, flags), List.<JCStatement>of(varDecl));
}
Aggregations