From 2db2d5539edabda5a04dd02d19e89d57adcf50c5 Mon Sep 17 00:00:00 2001 From: Haifeng Shi Date: Wed, 1 Mar 2023 16:59:16 -0500 Subject: [PATCH] assign constructor's astpath with non-empty value --- .../java/org/checkerframework/afu/scenelib/io/ASTIndex.java | 3 +++ 1 file changed, 3 insertions(+) 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); }