diff --git a/core/src/main/java/org/teavm/model/MethodDescriptor.java b/core/src/main/java/org/teavm/model/MethodDescriptor.java index 35d0ae460..5beef6647 100644 --- a/core/src/main/java/org/teavm/model/MethodDescriptor.java +++ b/core/src/main/java/org/teavm/model/MethodDescriptor.java @@ -15,12 +15,13 @@ */ package org.teavm.model; +import java.io.Serializable; import java.util.Arrays; -public class MethodDescriptor { +public class MethodDescriptor implements Serializable { private String name; private ValueType[] signature; - private int hash; + private transient int hash; public MethodDescriptor(String name, ValueType... signature) { if (signature.length < 1) { diff --git a/core/src/main/java/org/teavm/model/MethodReference.java b/core/src/main/java/org/teavm/model/MethodReference.java index 6f0ed370c..292f9ef41 100644 --- a/core/src/main/java/org/teavm/model/MethodReference.java +++ b/core/src/main/java/org/teavm/model/MethodReference.java @@ -35,8 +35,8 @@ import java.util.stream.Stream; */ public class MethodReference implements Serializable { private String className; - private transient MethodDescriptor descriptor; - private int hash; + private MethodDescriptor descriptor; + private transient int hash; public MethodReference(String className, MethodDescriptor descriptor) { this.className = className; diff --git a/core/src/main/java/org/teavm/model/ValueType.java b/core/src/main/java/org/teavm/model/ValueType.java index 767b24372..e19a6540c 100644 --- a/core/src/main/java/org/teavm/model/ValueType.java +++ b/core/src/main/java/org/teavm/model/ValueType.java @@ -27,7 +27,7 @@ public abstract class ValueType implements Serializable { public static class Object extends ValueType { private String className; - private int hash; + private transient int hash; public Object(String className) { this.className = className; @@ -126,7 +126,7 @@ public abstract class ValueType implements Serializable { public static class Array extends ValueType { private ValueType itemType; - private int hash; + private transient int hash; public Array(ValueType itemType) { this.itemType = itemType; diff --git a/jso/impl/src/main/java/org/teavm/jso/impl/JSClassProcessor.java b/jso/impl/src/main/java/org/teavm/jso/impl/JSClassProcessor.java index 7bd3a8fab..c111a561b 100644 --- a/jso/impl/src/main/java/org/teavm/jso/impl/JSClassProcessor.java +++ b/jso/impl/src/main/java/org/teavm/jso/impl/JSClassProcessor.java @@ -365,7 +365,7 @@ class JSClassProcessor { boolean returnByRef = method.getAnnotations().get(JSByRef.class.getName()) != null; if (returnByRef && !typeHelper.isSupportedByRefType(method.getResultType())) { diagnostics.error(callLocation, "Method {{m0}} is marked with @JSByRef, but does not return valid " - + "array type"); + + "array type", method.getReference()); return false; }