cast at call site problem (original) (raw)

Anna Kozlova Anna.Kozlova at jetbrains.com
Mon Apr 1 07:48:59 PDT 2013


Hello all,

Is it a bug or is it an intentional behavior: This code compiles {code} void foo(Set s) {}

void bar() {
    foo(Collections.emptySet());
}

{code}

but this code doesn't: {code} void foo(Set s) {}

void bar() {
    foo((Set<String>)Collections.emptySet());
}

{code}

Lambda build 83.

Thanks Anna



More information about the lambda-dev mailing list