Lines Matching defs:expected
135 Type expected,
142 a.type = chk.checkType(a.annotationType.pos(), at, expected);
190 Attribute enterAttributeValue(Type expected,
197 expected.tsym.complete();
200 return new Attribute.Error(expected);
202 if (expected.isPrimitive() || types.isSameType(expected, syms.stringType)) {
203 Type result = attr.attribExpr(tree, env, expected);
205 return new Attribute.Error(expected);
208 return new Attribute.Error(expected);
210 result = cfolder.coerce(result, expected);
211 return new Attribute.Constant(expected, result.constValue());
213 if (expected.tsym == syms.classType.tsym) {
214 Type result = attr.attribExpr(tree, env, expected);
216 return new Attribute.Error(expected);
219 return new Attribute.Error(expected);
224 if ((expected.tsym.flags() & Flags.ANNOTATION) != 0) {
227 expected = syms.errorType;
229 return enterAnnotation((JCAnnotation)tree, expected, env);
231 if (expected.tag == TypeTags.ARRAY) { // should really be isArray()
239 return new Attribute.Error(expected);
243 buf.append(enterAttributeValue(types.elemtype(expected),
247 na.type = expected;
249 Array(expected, buf.toArray(new Attribute[buf.length()]));
251 if (expected.tag == TypeTags.CLASS &&
252 (expected.tsym.flags() & Flags.ENUM) != 0) {
253 attr.attribExpr(tree, env, expected);
260 return new Attribute.Error(expected);
263 return new Attribute.Enum(expected, enumerator);
265 if (!expected.isErroneous())
267 return new Attribute.Error(attr.attribExpr(tree, env, expected));