diff --git a/annotation-file-utilities/src/main/java/org/checkerframework/afu/scenelib/io/ASTIndex.java b/annotation-file-utilities/src/main/java/org/checkerframework/afu/scenelib/io/ASTIndex.java index 48b3591e5..5d7bb273a 100644 --- a/annotation-file-utilities/src/main/java/org/checkerframework/afu/scenelib/io/ASTIndex.java +++ b/annotation-file-utilities/src/main/java/org/checkerframework/afu/scenelib/io/ASTIndex.java @@ -364,6 +364,9 @@ public Void visitMethod(MethodTree node, ASTRecord rec) { saveAll(node.getThrows(), rec, kind, ASTPath.THROWS); save(node.getBody(), rec, kind, ASTPath.BODY); inMethod = outMethod; + if (node.getReturnType() == null) { // if the method is constructor + return defaultAction(node, rec.extend(kind, ASTPath.TYPE)); + } return defaultAction(node, rec); }