Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support for Java 8 #1

Open
cogumbreiro opened this issue Nov 21, 2017 · 1 comment
Open

Support for Java 8 #1

cogumbreiro opened this issue Nov 21, 2017 · 1 comment
Assignees
Labels

Comments

@cogumbreiro
Copy link

Since the idea is to use java.util.function code, I'm wondering why aren't lambdas expected.

Here is my ProgramPassTest.java

public class PassProgramTest extends TestSuite
{
	@Override
	protected Function<List<String>,String> makeTestable()
	{
		return x -> {
		    StringBuffer buff = new StringBuffer();
		    Iterator<String> iter = x.iterator();
		    while (iter.hasNext()) {
		        buff.add(iter.next());
		    }
		    return buff.toString();
		};
	}
}

However, mvn test fails:

[ERROR] /home/tiago/Work/trialpack/src/test/java/PassProgramTest.java:[25,26] lambda expressions are not supported in -source 1.5
  (use -source 8 or higher to enable lambda expressions)

@rmbarnett-rice
Copy link
Collaborator

That's just the Maven default language level. I don't see why we couldn't change it to Java 8.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants