Compile-time question

Barry Burd bburd at
Sun Apr 7 12:27:32 PDT 2013

Duh !!! I was looking everywhere else for the error. I'm not used to seeing this message in response to an access modifier issue... error: method forEach in interface Stream<T> cannot
 be applied to given types;
      .forEach(p -> {
  required: Consumer<? super Person>
  found: (p)->{ p.d[...](); }
  reason: argument mismatch; cannot type-check lambda expression with inferred p
arameter types
      inferred types: Person
  where T is a type-variable:
    T extends Object declared in interface Stream
>>> On 4/7/2013 at 3:09 PM, in message <5161C451.8030003 at>, Brian Goetz <brian.goetz at> wrote:

display() is private in Person?


More information about the lambda-dev mailing list