Consider the following:
"x in c" and "!(x in c)" will use C's isCase method. However "x !in c" will use DGM.isNotCase(c,x) which static dispatches to DGM.isCase. The isNotCase extension methods added in Groovy 4 should probably use invokeMethod to dynamic dispatch to make use of the isCase implemented by C.
IMO it would be much simpler to ditch "isNotCase" and have "a not in b" work identically to "not(a in b)" so one cannot implement incongruent "in" and "!in" handling. Otherwise, expected behavior could be restored by disabling
GROOVY-10383 optimization when declaring class of isCase and isNotCase differ.