Closed NolwennD closed 2 months ago
Hello,
In the code below, when I inline the hello method, yield is added and syntax is not valid. Inline works well when there is a block.
public class FailedInline { static String beforeInline(FizzBuzz fizzBuzz) { return switch (fizzBuzz) { case FIZZ -> hello(); case BUZZ -> hello(); }; } static String afterInline(FizzBuzz fizzBuzz) { return switch (fizzBuzz) { case FIZZ -> hello(); case BUZZ -> yield "World"; //case BUZZ -> "World"; <– expected result }; } enum FizzBuzz {FIZZ, BUZZ} private static String hello() { return "World"; } }
Eclipse version : Version: 2024-03 (4.31.0) Build id: 20240307-1437
Hello,
In the code below, when I inline the hello method, yield is added and syntax is not valid. Inline works well when there is a block.
Eclipse version : Version: 2024-03 (4.31.0) Build id: 20240307-1437