cast at call site problem

Brian Goetz brian.goetz at oracle.com
Mon Apr 1 07:58:49 PDT 2013


Seems like a bug.

On 4/1/2013 10:48 AM, Anna Kozlova wrote:
> Hello all,
>
> Is it a bug or is it an intentional behavior:
> This code compiles
> {code}
>      void foo(Set<String> s) {}
>
>      void bar() {
>          foo(Collections.emptySet());
>      }
> {code}
>
> but this code doesn't:
> {code}
>      void foo(Set<String> s) {}
>
>      void bar() {
>          foo((Set<String>)Collections.emptySet());
>      }
> {code}
>
> Lambda build 83.
>
> Thanks
> Anna
>
>
>


More information about the lambda-dev mailing list