From 800edc837dd169eccab74ab73536127049ff2684 Mon Sep 17 00:00:00 2001 From: Volker Berlin Date: Sun, 26 Jan 2020 13:11:11 +0100 Subject: [PATCH] test for partial lambda code --- .../jwebassembly/runtime/RuntimeErrors.java | 17 ++++++++++++++++- 1 file changed, 16 insertions(+), 1 deletion(-) diff --git a/test/de/inetsoftware/jwebassembly/runtime/RuntimeErrors.java b/test/de/inetsoftware/jwebassembly/runtime/RuntimeErrors.java index 52fd6c2..8b453c1 100644 --- a/test/de/inetsoftware/jwebassembly/runtime/RuntimeErrors.java +++ b/test/de/inetsoftware/jwebassembly/runtime/RuntimeErrors.java @@ -1,5 +1,5 @@ /* - * Copyright 2017 - 2018 Volker Berlin (i-net software) + * Copyright 2017 - 2020 Volker Berlin (i-net software) * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -96,4 +96,19 @@ public class RuntimeErrors { @Export native static float function(); } + + @Test + public void lambdas() throws IOException { + compileErrorTest( "InvokeDynamic/Lambda is not supported.", LambdaMethod.class ); + } + + static class LambdaMethod { + private static int counter; + + @Export + static void runnable() { + Runnable run = () -> counter++; + run.run(); + } + } }