Hacker News new | ask | show | jobs
by tmarthal 4161 days ago
The other poster is right. That is typing, that is not static type checking.

You can write code like:

List<MyObject> mylist = new HashSet<Integer>() {{ add("string"); add(1L); }}

You will get groovy.lang.GroovyRuntimeException with constructor issues.