aboutsummaryrefslogtreecommitdiffstats
path: root/tests/new/AroundNumericCastCE.java
diff options
context:
space:
mode:
authorwisberg <wisberg>2002-12-16 18:51:06 +0000
committerwisberg <wisberg>2002-12-16 18:51:06 +0000
commit144143c2970a1e874d74cdbd0f8c622d4282a3c3 (patch)
treeb12383d3d9e76c7e1f25f7fbec83051ef17f81fb /tests/new/AroundNumericCastCE.java
parentfafae443719b26159ab2d7dac1c9b46b5e00b671 (diff)
downloadaspectj-144143c2970a1e874d74cdbd0f8c622d4282a3c3.tar.gz
aspectj-144143c2970a1e874d74cdbd0f8c622d4282a3c3.zip
initial version
Diffstat (limited to 'tests/new/AroundNumericCastCE.java')
-rw-r--r--tests/new/AroundNumericCastCE.java26
1 files changed, 26 insertions, 0 deletions
diff --git a/tests/new/AroundNumericCastCE.java b/tests/new/AroundNumericCastCE.java
new file mode 100644
index 000000000..4e357ebd3
--- /dev/null
+++ b/tests/new/AroundNumericCastCE.java
@@ -0,0 +1,26 @@
+
+import org.aspectj.testing.Tester;
+
+/** @testcase PR#838 checking around join point for advice return type - numeric */
+public class AroundNumericCastCE {
+
+ public static double doubleMethod(int total){
+ return (double) total;
+ }
+
+ public static int intMethod(int total){
+ return total;
+ }
+
+ public static aspect Selector{
+ // expect CE "illegal return value" from execution(int intMethod(int))
+ double around(int i) : execution(* *Method(int)) && args(i) { // CE 17
+ return proceed(i);
+ }
+ }
+ public static void main(String[] args){
+ double result = doubleMethod(1000);
+ Tester.check(result != 0, "calculatePayment(1000)");
+ }
+}
+