Groovy has an optional compile time checking feature on a per-class basis via an annotation (this has been around for a long time)
https://docs.groovy-lang.org/latest/html/api/groovy/transfor...
https://livebook.manning.com/book/groovy-in-action-second-ed...