From: Hannu Niemistö Date: Mon, 30 Oct 2017 17:35:24 +0000 (+0200) Subject: (refs #7586) Allow always conversion to Object in SCL-Java interface X-Git-Tag: v1.31.0~78^2 X-Git-Url: https://gerrit.simantics.org/r/gitweb?p=simantics%2Fplatform.git;a=commitdiff_plain;h=05727365a113b331f125c30118ed95d422481005 (refs #7586) Allow always conversion to Object in SCL-Java interface Change-Id: Ia35b1f4dd2b31fc1e218f0321acdd8ac72f03694 --- diff --git a/bundles/org.simantics.scl.compiler/src/org/simantics/scl/compiler/internal/codegen/types/AbstractRuntimeJavaReferenceValidator.java b/bundles/org.simantics.scl.compiler/src/org/simantics/scl/compiler/internal/codegen/types/AbstractRuntimeJavaReferenceValidator.java index d1e2ade64..d186584d4 100644 --- a/bundles/org.simantics.scl.compiler/src/org/simantics/scl/compiler/internal/codegen/types/AbstractRuntimeJavaReferenceValidator.java +++ b/bundles/org.simantics.scl.compiler/src/org/simantics/scl/compiler/internal/codegen/types/AbstractRuntimeJavaReferenceValidator.java @@ -137,7 +137,7 @@ implements JavaReferenceValidator, Method, Field, Constructor> { @Override public boolean isAssignableFrom(TypeDesc to, TypeDesc from) { - if(to == from) + if(to.equals(from) || to.equals(TypeDesc.OBJECT)) return true; Class toClass = findClass(to); Class fromClass = findClass(from);