Consider the following:
import groovy.transform.stc.*
class C {
def call(@ClosureParams(value=FromString, options='Number') @DelegatesTo(Number) Closure spec) {
42.with(spec)
}
}
class Foo {
C c = new C()
void test() {
c {
println it
println intValue()
}
}
}
c { ... } executes as c.call({ ... }) (see MetaClassImpl#invokePropertyOrMissing). Type inferencing fails to use call method metadata.

Consider the following:
c { ... }executes asc.call({ ... })(see MetaClassImpl#invokePropertyOrMissing). Type inferencing fails to use call method metadata.