From 358beefe5e1e0ee7fd2da5b025fd419fcd0a71c1 Mon Sep 17 00:00:00 2001 From: aclement Date: Sun, 8 Jun 2008 21:36:29 +0000 Subject: test and fix for 226201 - convert return type of generic advice to parameterized type --- tests/bugs161/pr226201/IntAspTest.java | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) create mode 100644 tests/bugs161/pr226201/IntAspTest.java (limited to 'tests/bugs161') diff --git a/tests/bugs161/pr226201/IntAspTest.java b/tests/bugs161/pr226201/IntAspTest.java new file mode 100644 index 000000000..8c7cb28bb --- /dev/null +++ b/tests/bugs161/pr226201/IntAspTest.java @@ -0,0 +1,23 @@ + +abstract aspect GenAsp { + public abstract T transform(T x); + T around() : execution(T *(*)) {return transform(proceed());} +} + +aspect IntAsp extends GenAsp { + + public Integer transform(Integer x) {return x;} // identity transformation +} + +public class IntAspTest { + static Integer mylength(String x) {return x.length();} + + public static void main(String[] args) { + try { + System.out.println(mylength("")); + } catch (StackOverflowError soe) { + + } + } +} + -- cgit v1.2.3