aboutsummaryrefslogtreecommitdiffstats
path: root/tests/features193/Switch2.java
diff options
context:
space:
mode:
Diffstat (limited to 'tests/features193/Switch2.java')
-rw-r--r--tests/features193/Switch2.java15
1 files changed, 9 insertions, 6 deletions
diff --git a/tests/features193/Switch2.java b/tests/features193/Switch2.java
index c4acc82d9..391ea30f9 100644
--- a/tests/features193/Switch2.java
+++ b/tests/features193/Switch2.java
@@ -7,11 +7,14 @@ public class Switch2 {
}
public static int one(Color color) {
- int result = switch(color) {
- case R -> 0;
- case G -> 1;
- case B -> 2;
- default -> 3;
+ int result = switch (color) {
+ case R -> 0;
+ case G -> {
+ int number4 = 8 / 2;
+ yield number4 /4;
+ }
+ case B -> 2;
+ default -> 3;
};
return result;
}
@@ -25,4 +28,4 @@ aspect X {
int around(): call(* one(..)) {
return proceed()*2;
}
-} \ No newline at end of file
+}