Changelog for Groovy 4.0.2

Bug

  • [GROOVY-10114] - Wrong type argument inference when using the result of ternary operator directly.
  • [GROOVY-10357] - STC crashes on compiling an abstract method with default arguments and lambda
  • [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-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)