Skip to content

Commit

Permalink
Initial commit
Browse files Browse the repository at this point in the history
  • Loading branch information
armughan11 committed Jun 22, 2024
1 parent 0d0a3ef commit da98d36
Showing 1 changed file with 2 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -508,6 +508,7 @@ public TransferResult<Nullness, NullnessStore> visitAssignment(
Node rhs = node.getExpression();
Nullness value = values(input).valueOfSubNode(rhs);
Node target = node.getTarget();

if (target instanceof LocalVariableNode
&& !castToNonNull(ASTHelpers.getType(target.getTree())).isPrimitive()) {
LocalVariableNode localVariableNode = (LocalVariableNode) target;
Expand Down Expand Up @@ -793,6 +794,7 @@ public TransferResult<Nullness, NullnessStore> visitArrayAccess(
if (config.isJSpecifyMode()) {
Symbol arraySymbol;
boolean isElementNullable = false;
// For enhanced-for-loops we get the symbol from the array expression as the node is desugared
ExpressionTree arrayExpr = node.getArrayExpression();
if (arrayExpr != null) {
arraySymbol = ASTHelpers.getSymbol(arrayExpr);
Expand Down

0 comments on commit da98d36

Please sign in to comment.