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 <o...@ocs.cz> wrote:

> 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 best,
> OC
>
>

Reply via email to