blob: 313c0880fb8507b431dd7d751e4c1b8ee7e1906c [file] [log] [blame]
import java.util.function.Consumer;
public class Bug578145LambdaInFieldDeclaration {
Runnable runnable = new Runnable() {
@Override
public void run() {
int numberInRunnable = 1;
Consumer<Integer> myConsumer = (lambdaArg) -> {
int numberInLambda = 10;
System.out.println("id = " + lambdaArg); // Add breakpoint here
};
myConsumer.accept(numberInRunnable);
}
};
public static void main(String[] args) {
Bug578145LambdaInFieldDeclaration instance = new Bug578145LambdaInFieldDeclaration();
instance.runnable.run();
}
}