Java, typeres: fix PR comments
This commit is contained in:
@ -40,10 +40,12 @@ public class ASTExpression extends AbstractJavaTypeNode {
|
|||||||
|
|
||||||
ASTLiteral literal = primaryPrefix.getFirstChildOfType(ASTLiteral.class);
|
ASTLiteral literal = primaryPrefix.getFirstChildOfType(ASTLiteral.class);
|
||||||
|
|
||||||
if (literal == null || literal.jjtGetNumChildren() != 0) {
|
if (literal == null || literal.isStringLiteral()
|
||||||
|
|| (literal.jjtGetNumChildren() != 0 && literal.jjtGetChild(0) instanceof ASTNullLiteral)) {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// byte, short, char, int, long, float, double, boolean
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -37,8 +37,7 @@ public final class TypeInferenceResolver {
|
|||||||
|
|
||||||
List<Bound> newBounds = new ArrayList<>();
|
List<Bound> newBounds = new ArrayList<>();
|
||||||
while (!constraints.isEmpty()) {
|
while (!constraints.isEmpty()) {
|
||||||
List<BoundOrConstraint> reduceResult = constraints.get(constraints.size() - 1).reduce();
|
List<BoundOrConstraint> reduceResult = constraints.remove(constraints.size() - 1).reduce();
|
||||||
constraints.remove(constraints.size() - 1);
|
|
||||||
|
|
||||||
for (BoundOrConstraint boundOrConstraint : reduceResult) {
|
for (BoundOrConstraint boundOrConstraint : reduceResult) {
|
||||||
if (boundOrConstraint instanceof Bound) {
|
if (boundOrConstraint instanceof Bound) {
|
||||||
|
Reference in New Issue
Block a user