Details
-
Bug
-
Status: Closed
-
Minor
-
Resolution: Fixed
-
2.1.0
-
None
Description
We get Groovyc: [Static type checking] - The variable [attrs] is undeclared. in the following scenario:
import groovy.transform.CompileStatic import static groovy.lang.Closure.* @CompileStatic class DatasourceBuilder { Map<String,String> attrs = [:] } void datasource(@DelegatesTo(strategy = DELEGATE_FIRST, value = DatasourceBuilder) Closure c) {} @CompileStatic void foo() { datasource { attrs['some'] = 'foo' } }