Re: [VOTE] Release Apache Groovy 4.0.22

2024-06-30 Thread Paul King
The vote has passed with FOUR +1 binding votes and no other votes. I'll proceed with the next steps. Paul. Virus-free.www.avast.com

[RESULT][VOTE] Release Apache Groovy 5.0.0-alpha-9

2024-06-30 Thread Paul King
The vote has passed with FOUR +1 binding votes and no other votes. I'll proceed with the next steps. Paul. On Thu, Jun 27, 2024 at 6:38 PM Paul King wrote: > > Dear development community, > > I am happy to start the VOTE thread for a Groovy 5.0.0-alpha-9 release! > > This release includes 57 b

[ANNOUNCE] Apache Groovy 3.0.22 Released

2024-06-30 Thread Paul King
Dear community, The Apache Groovy team is pleased to announce version 3.0.22 of Apache Groovy. Apache Groovy is a multi-faceted programming language for the JVM. Further details can be found at the https://groovy.apache.org website. This release is a maintenance release of the GROOVY_3_0_X branch

[ANNOUNCE] Apache Groovy 4.0.22 Released

2024-06-30 Thread Paul King
Dear community, The Apache Groovy team is pleased to announce version 4.0.22 of Apache Groovy. Apache Groovy is a multi-faceted programming language for the JVM. Further details can be found at the https://groovy.apache.org website. This release is a maintenance release of the GROOVY_4_0_X branch

[ANNOUNCE] Apache Groovy 5.0.0-alpha-9 Released

2024-06-30 Thread Paul King
Dear community, The Apache Groovy team is pleased to announce version 5.0.0-alpha-9 of Apache Groovy. Apache Groovy is a multi-faceted programming language for the JVM. Further details can be found at the https://groovy.apache.org website. This is a pre-release of a new version of Groovy. We grea

switch does not recognise Class?

2024-06-30 Thread o...@ocs.cz
Hi there, is this the intended behaviour? === groovy:000> switch (String) { case Class: println "C"; break; case {it instanceof Class}: println "CC" } CC ===> null groovy:000> === Based on the switch documented semantic I would presume "C" should be printed out, not "CC"? Thanks and all the

Re: switch does not recognise Class?

2024-06-30 Thread Christopher Smith
You're comparing `class java.lang.String` and `class java.lang.Class`. Which rule in the docs leads you to expect this to be truthy? On Sun, Jun 30, 2024, 13:17 o...@ocs.cz wrote: > Hi there, > > is this the intended behaviour? > > === > groovy:000> switch (String) { case Class: println "C"; bre

Re: switch does not recognise Class?

2024-06-30 Thread OCsite
Christopher, > On 30. 6. 2024, at 22:42, Christopher Smith wrote: > You're comparing `class java.lang.String` and `class java.lang.Class`. > No, I'm not. > Which rule in the docs leads you to expect this to be truthy? > The very first documented one, namely Class case values match if the switc

Re: switch does not recognise Class?

2024-06-30 Thread Paul King
For instances, instanceof is applied. For classes, isAssignableFrom is applied. You can always check by looking at isCase. assert String.isCase('foo') assert !Class.isCase(String) assert CharSequence.isCase(String) assert Object.isCase(Class) assert switch(String) { case Class -> false c

Re: switch does not recognise Class?

2024-06-30 Thread OCsite
Paul, > On 30. 6. 2024, at 23:03, Paul King wrote: > For instances, instanceof is applied. For classes, isAssignableFrom is > applied. I see, thanks! Is that documented somewhere? Perhaps I'm just blind, but I can't see it here

Re: switch does not recognise Class?

2024-06-30 Thread Paul King
The isCase operator is documented under operator overloading: https://docs.groovy-lang.org/latest/html/documentation/#_operator_overloading With further clarification here: https://docs.groovy-lang.org/latest/html/groovy-jdk/java/lang/Class.html#isCase(java.lang.Object) But yeah, it would be bett