GROOVY-6496: Compilation failure if an extension method uses a primitive type and a generic type