daniellansun commented on code in PR #2784:
URL: https://github.com/apache/groovy/pull/2784#discussion_r3785704576


##########
src/spec/test/SemanticsTest.groovy:
##########
@@ -184,11 +184,28 @@ final class SemanticsTest {
             case 'Adam'   -> 'Eve'
             case 'Antony' -> 'Cleopatra'
             case 'Bonnie' -> 'Clyde'
+            default       -> 'Unknown'

Review Comment:
   No good reason for *this* snippet. The example always matches `'Romeo'`; 
exhaustiveness is already described in the surrounding prose and in the 
yield-block example. The added `default` has been reverted so the published 
example matches the 4.0 shape.



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to