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);
|
||||
|
||||
if (literal == null || literal.jjtGetNumChildren() != 0) {
|
||||
if (literal == null || literal.isStringLiteral()
|
||||
|| (literal.jjtGetNumChildren() != 0 && literal.jjtGetChild(0) instanceof ASTNullLiteral)) {
|
||||
return false;
|
||||
}
|
||||
|
||||
// byte, short, char, int, long, float, double, boolean
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
@ -37,9 +37,8 @@ public final class TypeInferenceResolver {
|
||||
|
||||
List<Bound> newBounds = new ArrayList<>();
|
||||
while (!constraints.isEmpty()) {
|
||||
List<BoundOrConstraint> reduceResult = constraints.get(constraints.size() - 1).reduce();
|
||||
constraints.remove(constraints.size() - 1);
|
||||
|
||||
List<BoundOrConstraint> reduceResult = constraints.remove(constraints.size() - 1).reduce();
|
||||
|
||||
for (BoundOrConstraint boundOrConstraint : reduceResult) {
|
||||
if (boundOrConstraint instanceof Bound) {
|
||||
newBounds.add((Bound) boundOrConstraint);
|
||||
|
Reference in New Issue
Block a user