Mercurial > hg > graal-compiler
diff 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 |
line wrap: on
line diff
--- a/graal/com.oracle.truffle.dsl.processor/src/com/oracle/truffle/dsl/processor/parser/TypeSystemParser.java Wed Dec 03 22:10:15 2014 +0100 +++ b/graal/com.oracle.truffle.dsl.processor/src/com/oracle/truffle/dsl/processor/parser/TypeSystemParser.java Wed Dec 03 21:02:27 2014 +0100 @@ -216,7 +216,11 @@ typeData.addError("Invalid type order. The type(s) %s are inherited from a earlier defined type %s.", invalidTypes.get(ElementUtils.getQualifiedName(type)), ElementUtils.getQualifiedName(type)); } - List<String> nextInvalidTypes = ElementUtils.getQualifiedSuperTypeNames(ElementUtils.fromTypeMirror(type)); + TypeElement element = ElementUtils.fromTypeMirror(type); + List<String> nextInvalidTypes = new ArrayList<>(); + if (element != null) { + nextInvalidTypes.addAll(ElementUtils.getQualifiedSuperTypeNames(element)); + } nextInvalidTypes.add(getQualifiedName(type)); for (String qualifiedName : nextInvalidTypes) {