Changelog for Groovy 4.0.2

Bug

  • [GROOVY-10100] - groovyc infers the wrong type when using a method reference of a function with varargs
  • [GROOVY-10114] - Wrong type argument inference when using the result of ternary operator directly.
  • [GROOVY-10115] - STC: compiler error when using type parameter with extends
  • [GROOVY-10116] - STC: error when passing a type parameter in type constructor
  • [GROOVY-10130] - Flow typing does not work when && is combinded with instanceof
  • [GROOVY-10158] - Unexpected type mismatch when combining conditional and bounded type parameter
  • [GROOVY-10221] - Unexpected compile-time error when combining closures and bounded type parameters
  • [GROOVY-10226] - LUB is computed incorrectly when involving bounded type variables
  • [GROOVY-10266] - The diamond operator does not work when passing a value whose type is a type variable
  • [GROOVY-10267] - STC reports wrong message when encoutering wildcard types
  • [GROOVY-10350] - groovysh doesn't work on Arm64 architecture (Apple M1)
  • [GROOVY-10357] - STC crashes on compiling an abstract method with default arguments and lambda
  • [GROOVY-10358] - Unable to resolve method after LUB operator
  • [GROOVY-10367] - STC fails to infer the correct type for type variable in the presence of the diamond operator and bounded polymorphism
  • [GROOVY-10368] - STC fails to instantiate type variable when using diamond operator
  • [GROOVY-10466] - Compilation error on Spock expectation
  • [GROOVY-10482] - Incorrect inference of type argument of parameterized method call
  • [GROOVY-10494] - Groovy 4 can not compile super.foo with generic interface (or trait) method
  • [GROOVY-10495] - Invalid newlines generated by XmlTemplateEngine
  • [GROOVY-10499] - Incomplete type variable substitution when using wildcard type and diamond operator
  • [GROOVY-10520] - Incorrect line numbers for Closure classes in AstNode
  • [GROOVY-10528] - STC: NPE for raw type instanceof followed by parameterized extension method
  • [GROOVY-10540] - Inconsistent application of and checking for GroovyObject in classgen
  • [GROOVY-10541] - groovysh can not launch when running on Oracle Linux 8.5(ARM)
  • [GROOVY-10543] - Problem with groovy-all Gradle module metadata
  • [GROOVY-10544] - Static compiler chooses superinterface return type
  • [GROOVY-10548] - Static compiler allows property access on records but uses wrong method names
  • [GROOVY-10552] - @AutoImplement for method with type parameter(s)
  • [GROOVY-10553] - Regression: Annotation on trait field is illegally duplicated
  • [GROOVY-10556] - TypeChecked/CompileStatic index out of bounds
  • [GROOVY-10558] - Wrong argument type when using static method from nested class
  • [GROOVY-10561] - @NamedVariant self referential default values are not correctly resolved
  • [GROOVY-10565] - JDK 17: Sealed classes inside a package cause Exception in thread "main" java.lang.ClassFormatError: Illegal class name
  • [GROOVY-10570] - AnnotationCollector produces unspecified errors when used in Java
  • [GROOVY-10576] - STC: map putAll fails to match "?" to "Object"
  • [GROOVY-10579] - Type '[I' is not assignable to reference type when using Groovy 3.0.10
  • [GROOVY-10580] - Conditionally initialized `final` variables considered maybe uninitialized
  • [GROOVY-10583] - Stub generator handles method type parameter bounds incorrectly
  • [GROOVY-10585] - `@AutoFinal` does not use annotation parameters when used with `ASTTransformationCustomizer`
  • [GROOVY-10589] - TypeChecked/CompileStatic Incompatible generic argument types regression for List.sort(boolean, Comparator)
  • [GROOVY-7288] - @Delegate to object by Class which implementing trait with fields complains 'abstract method in a non-abstract class'
  • [GROOVY-8243] - SAM trait coercion via middle interface
  • [GROOVY-8244] - SAM trait coercion with default parameters
  • [GROOVY-9866] - Inner class of superinterface cannot be found

Dependency upgrade

Improvement

Sub-task

  • [GROOVY-10586] - Revert: Funnel doPrivileged through VMPlugin (JEP-411)

Task

  • [GROOVY-10560] - Provide additional XmlUtil variants for more options when disabling doctypes *

* potentially breaking change (read issue for details - even minor differences are sometimes flagged as potentially breaking changes)