Fix displaying diagnostics in out-of-process mode

This commit is contained in:
Alexey Andreev 2019-05-14 14:46:44 +03:00
parent 3d96616761
commit ca50f72fe9
4 changed files with 8 additions and 7 deletions

View File

@ -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) {

View File

@ -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;

View File

@ -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;

View File

@ -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;
}