Mercurial > hg > graal-compiler
changeset 11543:90c45cbbf9de
Truffle-DSL: fixed a bug in isAssignable.
author | Christian Humer <christian.humer@gmail.com> |
---|---|
date | Fri, 06 Sep 2013 16:10:09 +0200 |
parents | f15d955897b7 |
children | e5b5a5cb0ac7 |
files | graal/com.oracle.truffle.dsl.processor/src/com/oracle/truffle/dsl/processor/Utils.java |
diffstat | 1 files changed, 8 insertions(+), 0 deletions(-) [+] |
line wrap: on
line diff
--- 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) {