diff options
author | Alexander Kriegisch <Alexander@Kriegisch.name> | 2023-06-24 08:15:24 +0200 |
---|---|---|
committer | Alexander Kriegisch <Alexander@Kriegisch.name> | 2023-06-26 13:48:27 +0700 |
commit | 1e2d9683b4b0d75dfd9830ebeb482e56cf40fd8d (patch) | |
tree | 2e4b723ff23c6095ae3905c68d181a2c91a8f333 /tests/bugs1920 | |
parent | ba9ac235eea72de6b040166a098db183a5b04a6e (diff) | |
download | aspectj-1e2d9683b4b0d75dfd9830ebeb482e56cf40fd8d.tar.gz aspectj-1e2d9683b4b0d75dfd9830ebeb482e56cf40fd8d.zip |
Add failing test reproducing #246
Signed-off-by: Alexander Kriegisch <Alexander@Kriegisch.name>
Diffstat (limited to 'tests/bugs1920')
-rw-r--r-- | tests/bugs1920/github_246/App.java | 11 | ||||
-rw-r--r-- | tests/bugs1920/github_246/First.java | 5 | ||||
-rw-r--r-- | tests/bugs1920/github_246/ITDAspect.aj | 13 | ||||
-rw-r--r-- | tests/bugs1920/github_246/Second.java | 5 |
4 files changed, 34 insertions, 0 deletions
diff --git a/tests/bugs1920/github_246/App.java b/tests/bugs1920/github_246/App.java new file mode 100644 index 000000000..8e0bbe8bf --- /dev/null +++ b/tests/bugs1920/github_246/App.java @@ -0,0 +1,11 @@ +import java.lang.reflect.Method; +import java.util.Arrays; + +public class App { + public static void main(String[] args) { + for (Method method : App.class.getDeclaredMethods()) { + if (method.getName().equals("foo")) + System.out.println(Arrays.toString(method.getDeclaredAnnotations()) + " " + method); + } + } +} diff --git a/tests/bugs1920/github_246/First.java b/tests/bugs1920/github_246/First.java new file mode 100644 index 000000000..aa482ca6d --- /dev/null +++ b/tests/bugs1920/github_246/First.java @@ -0,0 +1,5 @@ +import java.lang.annotation.Retention; +import java.lang.annotation.RetentionPolicy; + +@Retention(RetentionPolicy.RUNTIME) +public @interface First { } diff --git a/tests/bugs1920/github_246/ITDAspect.aj b/tests/bugs1920/github_246/ITDAspect.aj new file mode 100644 index 000000000..fffef1651 --- /dev/null +++ b/tests/bugs1920/github_246/ITDAspect.aj @@ -0,0 +1,13 @@ +public aspect ITDAspect { + @First + @Second + public void App.foo(Object parameter) { } + + @First + public void App.foo(String parameter) { } + + @Second + public int App.foo(int parameter) { + return parameter + 3; + } +} diff --git a/tests/bugs1920/github_246/Second.java b/tests/bugs1920/github_246/Second.java new file mode 100644 index 000000000..d599f7b1a --- /dev/null +++ b/tests/bugs1920/github_246/Second.java @@ -0,0 +1,5 @@ +import java.lang.annotation.Retention; +import java.lang.annotation.RetentionPolicy; + +@Retention(RetentionPolicy.RUNTIME) +public @interface Second { } |