# HG changeset patch # User Christian Humer # Date 1378476609 -7200 # Node ID 90c45cbbf9dece474650662d55cdaf5418b99fcd # Parent f15d955897b7ef0076d98cda07b5173b5d89a3fb Truffle-DSL: fixed a bug in isAssignable. diff -r f15d955897b7 -r 90c45cbbf9de graal/com.oracle.truffle.dsl.processor/src/com/oracle/truffle/dsl/processor/Utils.java --- a/graal/com.oracle.truffle.dsl.processor/src/com/oracle/truffle/dsl/processor/Utils.java Fri Sep 06 16:08:59 2013 +0200 +++ b/graal/com.oracle.truffle.dsl.processor/src/com/oracle/truffle/dsl/processor/Utils.java Fri Sep 06 16:10:09 2013 +0200 @@ -192,6 +192,10 @@ return true; } + if (isObject(to)) { + return true; + } + // JLS 5.1.2 widening primitives if (Utils.isPrimitive(from) && Utils.isPrimitive(to)) { TypeKind fromKind = from.getKind(); @@ -257,6 +261,10 @@ return isAssignable(context, ((ArrayType) from).getComponentType(), ((ArrayType) to).getComponentType()); } + if (from instanceof ArrayType || to instanceof ArrayType) { + return false; + } + TypeElement fromType = Utils.fromTypeMirror(from); TypeElement toType = Utils.fromTypeMirror(to); if (fromType == null || toType == null) {