groovy-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Nathan Harvey <nathanwhar...@gmail.com>
Subject Functional interfaces and CompileStatic
Date Thu, 07 Dec 2017 19:08:12 GMT
Static compilation fails to recognize type parameters when functional
interfaces are used and a variable name is specified without a type. For
example:



Compiling this reports the error: [Static type checking] - Cannot find
matching method java.lang.Object#toUpperCase(). Please check if the declared
type is right and if the method exists.

The same error does not occur when using a Closure annotated with
@ClosureParams.



--
Sent from: http://groovy.329449.n5.nabble.com/Groovy-Dev-f372993.html

Mime
View raw message