hg: lambda/lambda/langtools: Fix: revert temporary changes to langtools build files

maurizio.cimadamore at oracle.com maurizio.cimadamore at oracle.com
Tue Nov 27 03:35:37 PST 2012


Changeset: e5380900874a
Author:    mcimadamore
Date:      2012-11-27 11:34 +0000
URL:       http://hg.openjdk.java.net/lambda/lambda/langtools/rev/e5380900874a

Fix: revert temporary changes to langtools build files
Enhancement: expression lambda returning an expression statement should be void compatible

This code did not work:

Set<String> = ...
Runnable r = ()->s.add("Hello!"); //add returns boolean, while the descriptor for Runnable is void

Now the above code works, as an expression statement (in the context of an expression lambda) is always void-compatible.

! makefiles/Makefile
! src/share/classes/com/sun/tools/javac/comp/Attr.java
! src/share/classes/com/sun/tools/javac/parser/JavacParser.java
! src/share/classes/com/sun/tools/javac/tree/TreeInfo.java
! test/tools/javac/lambda/LambdaConv21.java
! test/tools/javac/lambda/LambdaConv21.out
! test/tools/javac/lambda/VoidCompatibility.java
! test/tools/javac/lambda/VoidCompatibility.out



More information about the lambda-dev mailing list