Changelog for Groovy 3.0.20

Bug

  • [GROOVY-10055] - STC does not support self bounded types
  • [GROOVY-10080] - Closure with type argument inference does not work as expected
  • [GROOVY-10094] - STC misses type checks on default arguments
  • [GROOVY-10153] - STC: cannot combine use-variance with bounded polymorphism
  • [GROOVY-10228] - STC fails to substitute type variable in the presence of the diamond operator and a function call
  • [GROOVY-10271] - Wrong inference when using ternary operator with closure and variable
  • [GROOVY-10272] - Wrong inference when using ternary operator with lambdas
  • [GROOVY-10308] - SC incorrectly reports "access to Object#field" is forbidden
  • [GROOVY-10310] - STC is unable to call parameterized function
  • [GROOVY-10325] - STC: error for map*.value assignment
  • [GROOVY-10326] - STC: missing error for map*.key assignment
  • [GROOVY-10328] - STC: incorrect type inference for list, map, etc. with lower bound generics
  • [GROOVY-10356] - STC changes the inferred type of variable in the presence of flow typing
  • [GROOVY-10380] - SC: IncompatibleClassChangeError when calling interface default method from non-public interface
  • [GROOVY-10494] - Groovy 4 can not compile super.foo with generic interface (or trait) method
  • [GROOVY-10619] - STC: fix support for unbounded wildcard references to self-bounded type parameters
  • [GROOVY-10623] - Type mismatch when encountering unconditional flow typing and null
  • [GROOVY-10651] - STC: closure parameter type inference for raw type that is iterable over type parameter
  • [GROOVY-10671] - STC fails to compile AssertJ fluent API expression
  • [GROOVY-10674] - STC crashes when combining use-site variance with bounded polymorphism
  • [GROOVY-10688] - LUB does not work properly when mixing type parameter names and using wildcards
  • [GROOVY-10698] - Fail to infer the type argument when using nested diamond operator
  • [GROOVY-10897] - Static Type Checking selects wrong method for abstract method call check
  • [GROOVY-10936] - Patterns conditionally created using pattern operator ~ are cast to String/GString
  • [GROOVY-10975] - STC rejects program when passing method reference in parameterized function
  • [GROOVY-11006] - CompileStatic: cannot implicitly call double setter with BigDecimal literal
  • [GROOVY-11024] - STC NPE when using Collectors.toMap() with a generic result
  • [GROOVY-11028] - STC: empty map (or list) literal does not type check like emptyMap()
  • [GROOVY-11163] - Class parsing does not set erasure of type param with bounds
  • [GROOVY-11170] - Fix edge cases for SecureASTCustomizer
  • [GROOVY-11192] - Code that causes Groovy Compiler Crash
  • [GROOVY-11195] - STC: false positive for Class method called from static context
  • [GROOVY-11196] - ambiguous method error for tap on null receiver
  • [GROOVY-11209] - XmlUtil escapeControlCharacters escapes control characters 0-30 instead of 0-31
  • [GROOVY-11241] - Regression in STC generics solution
  • [GROOVY-11242] - Stackoverflow error when calling super from overridden method
  • [GROOVY-11250] - Compilation fails when accessing getter with shortcut notation on Java class
  • [GROOVY-7506] - Cannot assign value of type java.util.List<java.lang.String> to variable of type java.lang.String[]
  • [GROOVY-7992] - Sort methods that accept a comparator should accept Comparator<? super T> (fix type checker ability to cope with super in DGM methods)
  • [GROOVY-8488] - STC: floating-point literals no longer accepted as args to method with double parameter
  • [GROOVY-8909] - List literal type inference does not take its context into account
  • [GROOVY-8946] - @CompileStatic ignores declared type and forces a cast when inside a closure
  • [GROOVY-8948] - BigDecimal to primitive conversion not working
  • [GROOVY-9844] - STC infers too-narrow bounds for inline map
  • [GROOVY-9909] - Cannot call super when overriding an interface default method
  • [GROOVY-9998] - Wildcards with a lower bound fail static type checking

Dependency upgrade

Improvement

  • [GROOVY-10295] - STC: cannot infer list or map type for method return
  • [GROOVY-10341] - "super" invocations of abstract methods should be caught at compile time with static compilation enabled
  • [GROOVY-10660] - STC: infer closure/lambda parameter types for return expression
  • [GROOVY-11201] - STC: assign method pointer to SAM-type
  • [GROOVY-7106] - Improve coercion / implicit cast of map literals for @CompileStatic
  • [GROOVY-7274] - Improve type inference for hash map -> Map<?, ?>