]> gerrit.simantics Code Review - simantics/platform.git/commitdiff
(refs #7586) Allow always conversion to Object in SCL-Java interface 64/1164/1
authorHannu Niemistö <hannu.niemisto@semantum.fi>
Mon, 30 Oct 2017 17:35:24 +0000 (19:35 +0200)
committerHannu Niemistö <hannu.niemisto@semantum.fi>
Mon, 30 Oct 2017 17:35:54 +0000 (19:35 +0200)
Change-Id: Ia35b1f4dd2b31fc1e218f0321acdd8ac72f03694

bundles/org.simantics.scl.compiler/src/org/simantics/scl/compiler/internal/codegen/types/AbstractRuntimeJavaReferenceValidator.java

index d1e2ade645cdc57006866baa787083b21fd84fba..d186584d4e395c6bdf6863cb41ac2124d9154381 100644 (file)
@@ -137,7 +137,7 @@ implements JavaReferenceValidator<Class<?>, 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);