From d6f8ca124ba8bfd58350f1019ca3000aea0287d1 Mon Sep 17 00:00:00 2001 From: wisberg Date: Sat, 6 Sep 2003 23:20:15 +0000 Subject: [PATCH] @testcase PR#42668 after returning type incompatible with join point return type --- tests/ajcTestsFailing.xml | 10 +++++++++ .../IncompatibleAfterReturningTypeCE.java | 21 +++++++++++++++++++ 2 files changed, 31 insertions(+) create mode 100644 tests/bugs/IncompatibleAfterReturningTypeCE.java diff --git a/tests/ajcTestsFailing.xml b/tests/ajcTestsFailing.xml index 35fbdb6a1..485c4e1e6 100644 --- a/tests/ajcTestsFailing.xml +++ b/tests/ajcTestsFailing.xml @@ -5,6 +5,16 @@ + + + + + + + diff --git a/tests/bugs/IncompatibleAfterReturningTypeCE.java b/tests/bugs/IncompatibleAfterReturningTypeCE.java new file mode 100644 index 000000000..d935d344f --- /dev/null +++ b/tests/bugs/IncompatibleAfterReturningTypeCE.java @@ -0,0 +1,21 @@ + +public class IncompatibleAfterReturningTypeCE { + public static void main(String[] args) { + System.setProperty("foo", ""+"".length()); + } +} + +class C { + Integer getInteger() { + return null; + } +} + +/** @testcase PR#42668 after returning type incompatible with join point return type */ +aspect A { + + after () returning (Boolean b) : execution(Integer C.getInteger()) { } // CE 20 incompatible return type from join point + + after () returning (byte b) : call(int String.length()) {} // CE 22 incompatible return type + +} \ No newline at end of file -- 2.39.5