Mercurial > hg > graal-compiler
diff graal/com.oracle.truffle.dsl.processor/src/com/oracle/truffle/dsl/processor/parser/NodeParser.java @ 16834:21e0ab3c1395
Truffle-DSL: minor fix for import guards.
author | Christian Humer <christian.humer@gmail.com> |
---|---|
date | Thu, 14 Aug 2014 17:10:53 +0200 |
parents | 13cf9b6b325c |
children | 2db61eddcb97 |
line wrap: on
line diff
--- a/graal/com.oracle.truffle.dsl.processor/src/com/oracle/truffle/dsl/processor/parser/NodeParser.java Thu Aug 14 16:49:45 2014 +0200 +++ b/graal/com.oracle.truffle.dsl.processor/src/com/oracle/truffle/dsl/processor/parser/NodeParser.java Thu Aug 14 17:10:53 2014 +0200 @@ -125,7 +125,6 @@ return node; } - @SuppressWarnings("unchecked") private NodeData parseNode(TypeElement originalTemplateType) { // reloading the type elements is needed for ecj TypeElement templateType = ElementUtils.fromTypeMirror(context.reloadTypeElement(originalTemplateType)); @@ -139,11 +138,11 @@ if (!ElementUtils.isAssignable(templateType.asType(), context.getTruffleTypes().getNode())) { return null; } - List<? extends Element> elements = CompilerFactory.getCompiler(templateType).getAllMembersInDeclarationOrder(context.getEnvironment(), templateType); + List<Element> elements = new ArrayList<>(CompilerFactory.getCompiler(templateType).getAllMembersInDeclarationOrder(context.getEnvironment(), templateType)); NodeData node = parseNodeData(templateType, elements, lookupTypes); - parseImportGuards(node, lookupTypes, (List<Element>) elements); + parseImportGuards(node, lookupTypes, elements); if (node.hasErrors()) { return node; // error sync point