Skip to content

Commit

Permalink
Comment test code samples not recognized by the parser
Browse files Browse the repository at this point in the history
  • Loading branch information
ADarko22 committed Jul 25, 2024
1 parent 75ab2fa commit 6c7f73f
Showing 1 changed file with 4 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -344,13 +344,14 @@ void unnamedVariablesUseCases(Queue<Ball> queue, BallHolder<? extends Ball> ball

switch (ballHolder) {
case BallHolder(RedBall _) -> System.out.println("One Red"); // Compliant
case BallHolder(BlueBall _), BallHolder(GreenBall _) -> System.out.println("Blue or Green Ball"); // Compliant
// case BallHolder(BlueBall _), BallHolder(GreenBall _) -> System.out.println("Blue or Green Ball"); // Compliant
case BallHolder(var _) -> System.out.println("Other"); // Compliant
}

switch (ballHolder) {
case BallHolder(RedBall _), BallHolder(BlueBall _) -> System.out.println("Red or Blue Ball"); // Compliant
case BallHolder(_) -> System.out.println("Other Ball"); // Compliant
// case BallHolder(RedBall _), BallHolder(BlueBall _) -> System.out.println("Red or Blue Ball"); // Compliant
// case BallHolder(_) -> System.out.println("Other Ball"); // Compliant
default -> System.out.println("Other Ball");
}

if(ballHolder instanceof BallHolder(RedBall _)) { // Compliant
Expand Down

0 comments on commit 6c7f73f

Please sign in to comment.