Details
-
Bug
-
Status: Closed
-
Major
-
Resolution: Fixed
-
4.0.0-rc-2, 3.0.12
-
None
Description
Consider the following:
import java.util.function.Consumer def <T> T m(Consumer<? super T> c) { // ... } @groovy.transform.TypeChecked void test() { this.m { Number n -> def big = n.toBigInteger() } }
Recent fixes for closure param STC (GROOVY-8917, GROOVY-10049, GROOVY-10053, etc.) are producing an error for the param "expected Object actual Number" and an error for the call expression "cannot find method Object#toBigInteger()".
StaticTypeCheckingVisitor#inferClosureParamterTypes does not use closure expressions to determine placeholder types and there are no other type witnesses.
Attachments
Issue Links
- relates to
-
GROOVY-10648 Compile error during static compilation (missing type derivation?)
- Closed