-
Notifications
You must be signed in to change notification settings - Fork 35
Extra semicolon when returning lambda #53
Copy link
Copy link
Closed
Description
I don't know if this is a bug or I'm doing something wrong, but I can't find examples for lambdas so this is it:
JMethod method = definedClass.method(...);
JLambdaMethodRef methodLambda = new JLambdaMethodRef(...);
JLambda lambda = new JLambda();
lambda.body().lambdaExpr(
JExpr._this().invoke("getValueProvider").invoke("andThen").arg(methodLambda)
);
method.body()._return(lambda);This produces:
public default StringFilter<T> description() {
return () -> this.getValueProvider().andThen(Category::getDescription);
; // <- Unreachable code error!
}with the extra ; resulting in an "Unreachable code" error in Eclipse. How can I avoid the extra semicolon?
Reactions are currently unavailable