public void visitLiteral(JCLiteral tree) { result = check( tree, litType(tree.typetag).constType(tree.value), VAL, resultInfo); } //where
public void visitLiteral(JCLiteral tree) { result = check( tree, litType(tree.typetag).constType(tree.value), VAL, pkind, pt); } //where
public void visitLiteral(JCLiteral tree) { result = check( tree, litType(tree.typetag).constType(tree.value), VAL, pkind, pt); } //where
public void visitLiteral(JCLiteral tree) { result = check( tree, litType(tree.typetag).constType(tree.value), VAL, resultInfo); } //where
@Override public void typesInferred(InferenceContext inferenceContext) { ResultInfo pendingResult = resultInfo.dup(inferenceContext.asInstType(resultInfo.pt)); check(tree, inferenceContext.asInstType(found), ownkind, pendingResult); } });
public void visitAssign(JCAssign tree) { Type owntype = attribTree(tree.lhs, env.dup(tree), varInfo); Type capturedType = capture(owntype); attribExpr(tree.rhs, env, owntype); result = check(tree, capturedType, VAL, resultInfo); }
public void visitAssign(JCAssign tree) { Type owntype = attribTree(tree.lhs, env.dup(tree), VAR, Type.noType); Type capturedType = capture(owntype); attribExpr(tree.rhs, env, owntype); result = check(tree, capturedType, VAL, pkind, pt); }
public void visitWildcard(JCWildcard tree) { //- System.err.println("visitWildcard("+tree+");");//DEBUG Type type = (tree.kind.kind == BoundKind.UNBOUND) ? syms.objectType : attribType(tree.inner, env); result = check(tree, new WildcardType(chk.checkRefType(tree.pos(), type), tree.kind.kind, syms.boundClass), TYP, resultInfo); }
public void visitWildcard(JCWildcard tree) { //- System.err.println("visitWildcard("+tree+");");//DEBUG Type type = (tree.kind.kind == BoundKind.UNBOUND) ? syms.objectType : attribType(tree.inner, env); result = check(tree, new WildcardType(chk.checkRefType(tree.pos(), type), tree.kind.kind, syms.boundClass), TYP, pkind, pt); }
public void visitParens(JCParens tree) { Type owntype = attribTree(tree.expr, env, pkind, pt); result = check(tree, owntype, pkind, pkind, pt); Symbol sym = TreeInfo.symbol(tree); if (sym != null && (sym.kind&(TYP|PCK)) != 0) log.error(tree.pos(), "illegal.start.of.type"); }
public void visitParens(JCParens tree) { Type owntype = attribTree(tree.expr, env, resultInfo); result = check(tree, owntype, pkind(), resultInfo); Symbol sym = TreeInfo.symbol(tree); if (sym != null && (sym.kind&(TYP|PCK)) != 0) log.error(tree.pos(), "illegal.start.of.type"); }
public void visitConditional(JCConditional tree) { attribExpr(tree.cond, env, syms.booleanType); attribExpr(tree.truepart, env); attribExpr(tree.falsepart, env); result = check(tree, capture(condType(tree.pos(), tree.cond.type, tree.truepart.type, tree.falsepart.type)), VAL, pkind, pt); } //where
public void visitIndexed(JCArrayAccess tree) { Type owntype = syms.errType; Type atype = attribExpr(tree.indexed, env); attribExpr(tree.index, env, syms.intType); if (types.isArray(atype)) owntype = types.elemtype(atype); else if (atype.tag != ERROR) log.error(tree.pos(), "array.req.but.found", atype); if ((pkind & VAR) == 0) owntype = capture(owntype); result = check(tree, owntype, VAR, pkind, pt); }
public void visitTypeCast(JCTypeCast tree) { Type clazztype = attribType(tree.clazz, env); Type exprtype = attribExpr(tree.expr, env, Infer.anyPoly); Type owntype = chk.checkCastable(tree.expr.pos(), exprtype, clazztype); if (exprtype.constValue() != null) owntype = cfolder.coerce(exprtype, owntype); result = check(tree, capture(owntype), VAL, pkind, pt); }
public void visitIndexed(JCArrayAccess tree) { Type owntype = syms.errType; Type atype = attribExpr(tree.indexed, env); attribExpr(tree.index, env, syms.intType); if (types.isArray(atype)) owntype = types.elemtype(atype); else if (atype.tag != ERROR) log.error(tree.pos(), "array.req.but.found", atype); if ((pkind & VAR) == 0) owntype = capture(owntype); result = check(tree, owntype, VAR, pkind, pt); }
public void visitTypeCast(JCTypeCast tree) { Type clazztype = attribType(tree.clazz, env); Type exprtype = attribExpr(tree.expr, env, Infer.anyPoly); Type owntype = chk.checkCastable(tree.expr.pos(), exprtype, clazztype); if (exprtype.constValue() != null) owntype = cfolder.coerce(exprtype, owntype); result = check(tree, capture(owntype), VAL, pkind, pt); }
public void visitTypeTest(JCInstanceOf tree) { Type exprtype = chk.checkNullOrRefType( tree.expr.pos(), attribExpr(tree.expr, env)); Type clazztype = chk.checkReifiableReferenceType( tree.clazz.pos(), attribType(tree.clazz, env)); chk.checkCastable(tree.expr.pos(), exprtype, clazztype); result = check(tree, syms.booleanType, VAL, pkind, pt); }
public void visitTypeTest(JCInstanceOf tree) { Type exprtype = chk.checkNullOrRefType( tree.expr.pos(), attribExpr(tree.expr, env)); Type clazztype = chk.checkReifiableReferenceType( tree.clazz.pos(), attribType(tree.clazz, env)); chk.checkCastable(tree.expr.pos(), exprtype, clazztype); result = check(tree, syms.booleanType, VAL, pkind, pt); }
public void visitIndexed(JCArrayAccess tree) { Type owntype = types.createErrorType(tree.type); Type atype = attribExpr(tree.indexed, env); attribExpr(tree.index, env, syms.intType); if (types.isArray(atype)) owntype = types.elemtype(atype); else if (!atype.hasTag(ERROR)) log.error(tree.pos(), "array.req.but.found", atype); if ((pkind() & VAR) == 0) owntype = capture(owntype); result = check(tree, owntype, VAR, resultInfo); }
public void visitIndexed(JCArrayAccess tree) { Type owntype = types.createErrorType(tree.type); Type atype = attribExpr(tree.indexed, env); attribExpr(tree.index, env, syms.intType); if (types.isArray(atype)) owntype = types.elemtype(atype); else if (!atype.hasTag(ERROR)) log.error(tree.pos(), "array.req.but.found", atype); if ((pkind() & VAR) == 0) owntype = capture(owntype); result = check(tree, owntype, VAR, resultInfo); }