diff options
author | wisberg <wisberg> | 2003-09-06 23:20:15 +0000 |
---|---|---|
committer | wisberg <wisberg> | 2003-09-06 23:20:15 +0000 |
commit | d6f8ca124ba8bfd58350f1019ca3000aea0287d1 (patch) | |
tree | 0c69d316d21afafa19647c608106ef3350fd5c00 /tests | |
parent | 9af6b62b36884bcffc8a1ceeb6e5490a651afcc8 (diff) | |
download | aspectj-d6f8ca124ba8bfd58350f1019ca3000aea0287d1.tar.gz aspectj-d6f8ca124ba8bfd58350f1019ca3000aea0287d1.zip |
@testcase PR#42668 after returning type incompatible with join point return type
Diffstat (limited to 'tests')
-rw-r--r-- | tests/ajcTestsFailing.xml | 10 | ||||
-rw-r--r-- | tests/bugs/IncompatibleAfterReturningTypeCE.java | 21 |
2 files changed, 31 insertions, 0 deletions
diff --git a/tests/ajcTestsFailing.xml b/tests/ajcTestsFailing.xml index 35fbdb6a1..485c4e1e6 100644 --- a/tests/ajcTestsFailing.xml +++ b/tests/ajcTestsFailing.xml @@ -6,6 +6,16 @@ <suite> <ajc-test dir="bugs" + title="after returning type incompatible with join point return type" + pr="42668" + > + <compile files="IncompatibleAfterReturningTypeCE.java"> + <message kind="error" line="20"/> + <message kind="error" line="22"/> + </compile> + </ajc-test> + + <ajc-test dir="bugs" pr="41888" title="call PCD fails when given subtype of defining type"> <compile files="CallReference.java"/> 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 |