diff --git a/src/de/inetsoftware/jwebassembly/module/WasmCallInterfaceInstruction.java b/src/de/inetsoftware/jwebassembly/module/WasmCallInterfaceInstruction.java index 9e2d36e..221d5d6 100644 --- a/src/de/inetsoftware/jwebassembly/module/WasmCallInterfaceInstruction.java +++ b/src/de/inetsoftware/jwebassembly/module/WasmCallInterfaceInstruction.java @@ -58,6 +58,6 @@ class WasmCallInterfaceInstruction extends WasmCallInstruction { * {@inheritDoc} */ public void writeTo( @Nonnull ModuleWriter writer ) throws IOException { - throw new WasmException( "Interface calls not supported", getLineNumber() ); + throw new WasmException( "Interface calls are not supported.", getLineNumber() ); } } diff --git a/test/de/inetsoftware/jwebassembly/runtime/RuntimeErrors.java b/test/de/inetsoftware/jwebassembly/runtime/RuntimeErrors.java index 8b453c1..bf666b1 100644 --- a/test/de/inetsoftware/jwebassembly/runtime/RuntimeErrors.java +++ b/test/de/inetsoftware/jwebassembly/runtime/RuntimeErrors.java @@ -19,7 +19,9 @@ import static org.junit.Assert.assertTrue; import static org.junit.Assert.fail; import java.io.IOException; +import java.util.ArrayList; import java.util.Collection; +import java.util.List; import org.junit.Test; import org.junit.runner.RunWith; @@ -111,4 +113,18 @@ public class RuntimeErrors { run.run(); } } + + + @Test + public void interfaceCall() throws IOException { + compileErrorTest( "Interface calls are not supported.", InterfaceMethod.class ); + } + + static class InterfaceMethod { + @Export + static int runnable() { + List list = new ArrayList(); + return list.size(); + } + } }