From 735b53ed84ffca642111df363b73c9bac0cb4ec1 Mon Sep 17 00:00:00 2001
From: Johannes Mey <johannes.mey@tu-dresden.de>
Date: Tue, 17 Dec 2019 13:51:51 +0100
Subject: [PATCH] move method to correct aspect

---
 reusablecfg/src/main/jastadd/AlreadyClosedAnalysis.jrag    | 4 ++++
 reusablecfg/src/main/jastadd/VariableDeclarationScope.jrag | 4 ----
 2 files changed, 4 insertions(+), 4 deletions(-)

diff --git a/reusablecfg/src/main/jastadd/AlreadyClosedAnalysis.jrag b/reusablecfg/src/main/jastadd/AlreadyClosedAnalysis.jrag
index 47d4988..5767ebb 100644
--- a/reusablecfg/src/main/jastadd/AlreadyClosedAnalysis.jrag
+++ b/reusablecfg/src/main/jastadd/AlreadyClosedAnalysis.jrag
@@ -87,4 +87,8 @@ aspect AlreadyClosedAnalysis {
   /** Check if this is a Reader or Writer.  */
   syn boolean TypeDecl.isCloseable() =
       !isUnknown() && instanceOf(lookupType("java.io", "Closeable"));
+
+  /** @return {@code true} if this method access has the given variable as receiver. */
+  syn boolean MethodAccess.hasReceiver(Variable receiver) =
+      hasPrevExpr() && prevExpr().isVariable(receiver);
 }
diff --git a/reusablecfg/src/main/jastadd/VariableDeclarationScope.jrag b/reusablecfg/src/main/jastadd/VariableDeclarationScope.jrag
index 653d511..26be09c 100644
--- a/reusablecfg/src/main/jastadd/VariableDeclarationScope.jrag
+++ b/reusablecfg/src/main/jastadd/VariableDeclarationScope.jrag
@@ -20,10 +20,6 @@
  */
 aspect VariableDeclarationScope {
 
-  /** @return {@code true} if this method access has the given variable as receiver. */
-  syn boolean MethodAccess.hasReceiver(Variable receiver) =
-      hasPrevExpr() && prevExpr().isVariable(receiver);
-
   /**
    * Test if the CFG node is tied to a statement that declares the variable,
    * or if the declaration of the variable is somewhere inside the statement this
-- 
GitLab