Community
Participate
Working Groups
Created attachment 277488 [details] project containing problematic case environment: Oracle Java 11.0.2, Eclipse 4.11.M1, Windows 10 steps to reproduce: -import attached project java11.zip -open class VarInLambda and see that there is a compile error on construction: ArrayList<String> list = new ArrayList<>(); list.stream() .map((var s) -> s.toLowerCase()) .collect(Collectors.toList()); saying: The method map(Function<? super String,? extends R>) in the type Stream<String> is not applicable for the arguments ((var s) -> {}) The code compiles without errors under Java 11 javac. If we replace 'var s' with 'String s' everything works fine.
Thanks for the report. Fortunately we just fixed this on 2019-01-23 via bug 541532. *** This bug has been marked as a duplicate of bug 541532 ***