Mercurial > hg > graal-compiler
comparison graal/com.oracle.truffle.dsl.processor/src/com/oracle/truffle/dsl/processor/parser/TypeSystemParser.java @ 18605:58eb9bbb60c4
Truffle-DSL: fixed several bugs when using arrays as type. added arrays test.
author | Christian Humer <christian.humer@gmail.com> |
---|---|
date | Wed, 03 Dec 2014 21:02:27 +0100 |
parents | 93e061157811 |
children | a665483c3881 |
comparison
equal
deleted
inserted
replaced
18604:39441c10d314 | 18605:58eb9bbb60c4 |
---|---|
214 TypeMirror type = typeData.getBoxedType(); | 214 TypeMirror type = typeData.getBoxedType(); |
215 if (invalidTypes.containsKey(ElementUtils.getQualifiedName(type))) { | 215 if (invalidTypes.containsKey(ElementUtils.getQualifiedName(type))) { |
216 typeData.addError("Invalid type order. The type(s) %s are inherited from a earlier defined type %s.", invalidTypes.get(ElementUtils.getQualifiedName(type)), | 216 typeData.addError("Invalid type order. The type(s) %s are inherited from a earlier defined type %s.", invalidTypes.get(ElementUtils.getQualifiedName(type)), |
217 ElementUtils.getQualifiedName(type)); | 217 ElementUtils.getQualifiedName(type)); |
218 } | 218 } |
219 List<String> nextInvalidTypes = ElementUtils.getQualifiedSuperTypeNames(ElementUtils.fromTypeMirror(type)); | 219 TypeElement element = ElementUtils.fromTypeMirror(type); |
220 List<String> nextInvalidTypes = new ArrayList<>(); | |
221 if (element != null) { | |
222 nextInvalidTypes.addAll(ElementUtils.getQualifiedSuperTypeNames(element)); | |
223 } | |
220 nextInvalidTypes.add(getQualifiedName(type)); | 224 nextInvalidTypes.add(getQualifiedName(type)); |
221 | 225 |
222 for (String qualifiedName : nextInvalidTypes) { | 226 for (String qualifiedName : nextInvalidTypes) { |
223 List<String> inheritedTypes = invalidTypes.get(qualifiedName); | 227 List<String> inheritedTypes = invalidTypes.get(qualifiedName); |
224 if (inheritedTypes == null) { | 228 if (inheritedTypes == null) { |