Changelog for Groovy 4.0.0-beta-1

Bug

  • [GROOVY-3015] - Seems like ClosureMetaClass#invokeMethod does not respect the interceptable nature of the owner/delegate
  • [GROOVY-4320] - Joint compiler + @Delegate fail to recognize method signature with default value
  • [GROOVY-4610] - GroovyInterceptable (AOP) not working with closures
  • [GROOVY-8202] - void tail calls in closures break @CompileStatic type inference
  • [GROOVY-8409] - Static compilation with generic function wrapping BiFunction causes GroovyCastException
  • [GROOVY-8427] - Issue With Static Compiler And Generics
  • [GROOVY-8946] - @CompileStatic ignores declared type and forces a cast when inside a closure
  • [GROOVY-8974] - STC ignores declaration type
  • [GROOVY-9033] - Bad code green: empty list literal with each method
  • [GROOVY-9632] - Java 8 Type Param Annotation Not Generated in Byte Code
  • [GROOVY-9983] - Type argument inference does not work in ternary operator
  • [GROOVY-10033] - Compiler crash when encountering function reference on nested class
  • [GROOVY-10046] - NPE in static compiler
  • [GROOVY-10047] - STC infers Closure instead of SAM for method references
  • [GROOVY-10049] - STC fails when calling a generic method from another generic method
  • [GROOVY-10051] - STC: return type for unresolved placeholder with bound resolved to Object
  • [GROOVY-10053] - STC: Wrong type inferred for lambda parameter in a generic method
  • [GROOVY-10056] - Inferred parameter type of lambda expression for multi-dimensions array is not correct
  • [GROOVY-10057] - MissingMethodException for pointer/reference from Class instance to Class method
  • [GROOVY-10062] - STC: no type parameter inference for variadic method called with fewer arguments than parameters
  • [GROOVY-10063] - STC: multiple-assignment from tuple-bearing static method
  • [GROOVY-10067] - STC: Wrong return value type inferred for generic method with upper bound without parameters
  • [GROOVY-10071] - SC: closure with variadic parameter
  • [GROOVY-10072] - SC: closure with default argument(s)
  • [GROOVY-10075] - Static compiler incorrectly typechecks extension modules
  • [GROOVY-10079] - groovyc does not perform unboxing on Character type
  • [GROOVY-10080] - Closure with type argument inference does not work as expected
  • [GROOVY-10082] - Incompatible generic argument types when combining subtyping and closures
  • [GROOVY-10085] - Class.isCase() documentation does not clarify that Class.isCase(SomeClass) is false, or why
  • [GROOVY-10086] - STC misses type error when calling a vararg method
  • [GROOVY-10087] - STC does not perform boxing on chars when encountering assignment and function call
  • [GROOVY-10088] - STC: type argument not applied to error message
  • [GROOVY-10089] - SC: GroovyCastException for map value as constructor for Collection
  • [GROOVY-10091] - Incompatible generic argument types on closure's return type
  • [GROOVY-10097] - CLONE - Better propagation of InterruptedException (additional cases)

Dependency upgrade

Improvement

  • [GROOVY-9628] - Initial support for reproducible builds
  • [GROOVY-9800] - Log generic mismatches extensively
  • [GROOVY-10028] - Add support for type conversion from Stream to array/collection/list/set
  • [GROOVY-10029] - SC: produce direct method call for assignment of collection to array
  • [GROOVY-10034] - Compiler writes extra cast for Type[] to Object[]
  • [GROOVY-10035] - Eliminate redundant type cast
  • [GROOVY-10036] - STC: unresolved generics for return type of extension method call with full type arguments
  • [GROOVY-10050] - Add additional NamedParam annotations in ResourceGroovyMethods, NioExtensions and JsonSlurper
  • [GROOVY-10052] - STC sometimes requires explicit closure to SAM cast inside of another closure
  • [GROOVY-10061] - "del" ASCII character also should be escaped
  • [GROOVY-10077] - Groovy Console: Support JDKs without macOS Runtime Support for Java

New Feature

  • [GROOVY-4990] - Ability to create missing parent directories when using File.write()
  • [GROOVY-9804] - Support TOML
  • [GROOVY-10032] - CLONE - left-open and full-open ranges (consider adjusting containsWithinBounds behavior) *

Sub-task

  • [GROOVY-2686] - Can't call a Closure in a Closure's Delegete

Task

  • [GROOVY-10065] - Move stream-related extension methods to StreamGroovyMethods

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