From f1a83b5f2ba583e3c18542f962b569847a863844 Mon Sep 17 00:00:00 2001 From: aclement Date: Tue, 9 Dec 2008 19:21:17 +0000 Subject: [PATCH] 251326: testcase --- tests/bugs163/pr251326/pkgA/Listener.java | 7 +++++++ tests/bugs163/pr251326/pkgA/Target.java | 19 +++++++++++++++++++ tests/bugs163/pr251326/pkgB/InferListener.aj | 16 ++++++++++++++++ .../systemtest/ajc163/Ajc163Tests.java | 3 +++ .../org/aspectj/systemtest/ajc163/ajc163.xml | 10 ++++++++++ 5 files changed, 55 insertions(+) create mode 100644 tests/bugs163/pr251326/pkgA/Listener.java create mode 100644 tests/bugs163/pr251326/pkgA/Target.java create mode 100644 tests/bugs163/pr251326/pkgB/InferListener.aj diff --git a/tests/bugs163/pr251326/pkgA/Listener.java b/tests/bugs163/pr251326/pkgA/Listener.java new file mode 100644 index 000000000..d3a6f68ea --- /dev/null +++ b/tests/bugs163/pr251326/pkgA/Listener.java @@ -0,0 +1,7 @@ +package pkgA; + +public interface Listener { + + public void happened(String event); + +} diff --git a/tests/bugs163/pr251326/pkgA/Target.java b/tests/bugs163/pr251326/pkgA/Target.java new file mode 100644 index 000000000..00e1a5f5a --- /dev/null +++ b/tests/bugs163/pr251326/pkgA/Target.java @@ -0,0 +1,19 @@ +package pkgA; + +public class Target { + + public Listener listenA() { + return new Listener() { + public void happened(String event) { + System.out.println(event); + } + }; + } + + public static void main(String[] args) { + Target t = new Target(); + t.listenA().happened("Simple A"); + t.listenB().happened("Inferred B"); + } + +} diff --git a/tests/bugs163/pr251326/pkgB/InferListener.aj b/tests/bugs163/pr251326/pkgB/InferListener.aj new file mode 100644 index 000000000..7dfa14132 --- /dev/null +++ b/tests/bugs163/pr251326/pkgB/InferListener.aj @@ -0,0 +1,16 @@ +package pkgB; + +import pkgA.Listener; +import pkgA.Target; + +public aspect InferListener { + + public Listener Target.listenB() { + return new Listener() { + public void happened(String event) { + System.out.println(event); + } + }; + } + +} diff --git a/tests/src/org/aspectj/systemtest/ajc163/Ajc163Tests.java b/tests/src/org/aspectj/systemtest/ajc163/Ajc163Tests.java index 66f7a14c4..82bc47c82 100644 --- a/tests/src/org/aspectj/systemtest/ajc163/Ajc163Tests.java +++ b/tests/src/org/aspectj/systemtest/ajc163/Ajc163Tests.java @@ -27,6 +27,9 @@ import org.aspectj.testing.Utils; import org.aspectj.testing.XMLBasedAjcTestCase; public class Ajc163Tests extends org.aspectj.testing.XMLBasedAjcTestCase { +// public void testGenericMethodBridging_pr251326() { +// runTest("itd anonymous inner class in wrong package"); +// } public void testAtTargetPlus_pr255856() { runTest("attarget with plus"); diff --git a/tests/src/org/aspectj/systemtest/ajc163/ajc163.xml b/tests/src/org/aspectj/systemtest/ajc163/ajc163.xml index e3fcb32b2..bdeaeeb01 100644 --- a/tests/src/org/aspectj/systemtest/ajc163/ajc163.xml +++ b/tests/src/org/aspectj/systemtest/ajc163/ajc163.xml @@ -318,4 +318,14 @@ + + + + + + + + + + \ No newline at end of file -- 2.39.5