Skip to content

Commit

Permalink
bug fix
Browse files Browse the repository at this point in the history
  • Loading branch information
nimakarimipour committed Oct 10, 2024
1 parent 411098f commit 2a22661
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion injector/src/main/java/edu/ucr/cs/riple/injector/Helper.java
Original file line number Diff line number Diff line change
Expand Up @@ -393,7 +393,9 @@ public static Type getTypeFromNode(NodeWithAnnotations<?> node) {
return ((MethodDeclaration) node).getType();
}
if (node instanceof FieldDeclaration) {
return ((FieldDeclaration) node).getElementType();
FieldDeclaration fd = (FieldDeclaration) node;
Preconditions.checkArgument(!fd.getVariables().isEmpty());
return fd.getVariables().get(0).getType();
}
if (node instanceof VariableDeclarationExpr) {
NodeList<VariableDeclarator> decls = ((VariableDeclarationExpr) node).getVariables();
Expand Down

0 comments on commit 2a22661

Please sign in to comment.