Mercurial > hg > graal-jvmci-8
comparison graal/com.oracle.truffle.dsl.processor/src/com/oracle/truffle/dsl/processor/parser/TypeSystemParser.java @ 16923:93e061157811
Truffle-DSL: better support for types with type arguments.
author | Christian Humer <christian.humer@gmail.com> |
---|---|
date | Mon, 25 Aug 2014 20:59:56 +0200 |
parents | 0370880ac9ce |
children | 58eb9bbb60c4 |
comparison
equal
deleted
inserted
replaced
16922:0ea0c4133b78 | 16923:93e061157811 |
---|---|
181 final AnnotationValue annotationValue = ElementUtils.getAnnotationValue(typeSystem.getTemplateTypeAnnotation(), "value"); | 181 final AnnotationValue annotationValue = ElementUtils.getAnnotationValue(typeSystem.getTemplateTypeAnnotation(), "value"); |
182 final TypeMirror objectType = context.getType(Object.class); | 182 final TypeMirror objectType = context.getType(Object.class); |
183 | 183 |
184 int index = 0; | 184 int index = 0; |
185 for (TypeMirror primitiveType : typeMirrors) { | 185 for (TypeMirror primitiveType : typeMirrors) { |
186 TypeMirror boxedType = ElementUtils.boxType(context, primitiveType); | 186 TypeMirror primitive = ElementUtils.fillInGenericWildcards(primitiveType); |
187 TypeData typeData = new TypeData(typeSystem, index, annotationValue, primitiveType, boxedType); | 187 |
188 | 188 TypeMirror boxedType = ElementUtils.boxType(context, primitive); |
189 if (isPrimitiveWrapper(primitiveType)) { | 189 TypeData typeData = new TypeData(typeSystem, index, annotationValue, primitive, boxedType); |
190 | |
191 if (isPrimitiveWrapper(primitive)) { | |
190 typeData.addError("Types must not contain primitive wrapper types."); | 192 typeData.addError("Types must not contain primitive wrapper types."); |
191 } | 193 } |
192 | 194 |
193 if (ElementUtils.typeEquals(boxedType, objectType)) { | 195 if (ElementUtils.typeEquals(boxedType, objectType)) { |
194 typeData.addError("Types must not contain the generic type java.lang.Object."); | 196 typeData.addError("Types must not contain the generic type java.lang.Object."); |