From 3823ddafc2fbcb4f08865de9e5e64952ee326727 Mon Sep 17 00:00:00 2001 From: Volker Berlin Date: Sun, 5 Jan 2020 20:30:54 +0100 Subject: [PATCH] constructor has a hidden "this" parameter --- .../inetsoftware/jwebassembly/module/WasmCallInstruction.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/de/inetsoftware/jwebassembly/module/WasmCallInstruction.java b/src/de/inetsoftware/jwebassembly/module/WasmCallInstruction.java index 4b0d2c7..e0d68f6 100644 --- a/src/de/inetsoftware/jwebassembly/module/WasmCallInstruction.java +++ b/src/de/inetsoftware/jwebassembly/module/WasmCallInstruction.java @@ -1,5 +1,5 @@ /* - Copyright 2018 - 2019 Volker Berlin (i-net software) + Copyright 2018 - 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. @@ -84,7 +84,7 @@ class WasmCallInstruction extends WasmInstruction { * true, if the method is static */ void markAsNeeded( @Nonnull FunctionManager functions, boolean isStatic ) { - name = functions.markAsNeeded( name, isStatic ); + name = functions.markAsNeeded( name, isStatic && !name.methodName.equals( "" ) ); // a constructor is like static call but has a hidden "this" parameter. } /**