comparison graal/com.oracle.truffle.dsl.processor/src/com/oracle/truffle/dsl/processor/model/TypeSystemData.java @ 20990:e6b59c7b3991

Truffle-DSL: fixed invalid types compares. they do not work in javac.
author Christian Humer <christian.humer@oracle.com>
date Thu, 16 Apr 2015 14:43:13 +0200
parents 18c0f02fa4d2
children 8e5f9310f3aa
comparison
equal deleted inserted replaced
20989:4213d02d95b5 20990:e6b59c7b3991
132 public ImplicitCastData lookupCast(TypeMirror sourceType, TypeMirror targetType) { 132 public ImplicitCastData lookupCast(TypeMirror sourceType, TypeMirror targetType) {
133 if (getImplicitCasts() == null) { 133 if (getImplicitCasts() == null) {
134 return null; 134 return null;
135 } 135 }
136 for (ImplicitCastData cast : getImplicitCasts()) { 136 for (ImplicitCastData cast : getImplicitCasts()) {
137 if (cast.getSourceType().equals(sourceType) && cast.getTargetType().equals(targetType)) { 137 if (ElementUtils.typeEquals(cast.getSourceType(), sourceType) && ElementUtils.typeEquals(cast.getTargetType(), targetType)) {
138 return cast; 138 return cast;
139 } 139 }
140 } 140 }
141 return null; 141 return null;
142 } 142 }