Details
-
Bug
-
Status: Closed
-
Minor
-
Resolution: Fixed
-
2.5.13
-
None
Description
I don't know when it started to happen, but it worked somewhere in the past.
This code does not compile with 2.5.13:
package test import groovy.sql.Sql import groovy.transform.CompileStatic @CompileStatic public class Test { void foo() { Map<String, Object> r = new Sql((Sql) null).firstRow("") } }
The error given is:
Groovy:[Static type checking] - Incompatible generic argument types. Cannot assign groovy.sql.GroovyRowResult to: java.util.Map <String, Object>
This is probably due to the fact that GroovyRowResult implements Map as a raw type, but IMHO Map<String, Object> should be the right generic interface for it, so perhaps an improvement can be made?