Details
-
Bug
-
Status: Closed
-
Major
-
Resolution: Fixed
-
None
-
None
Description
Should be compiled well:
@CompileStatic class TestType { static def bar(Object b) { b.with { obj -> assert obj instanceof String obj.toUpperCase() // error: Cannot find matching method java.lang.Object#toUpperCase(). } } }
Funny moment - on implicit 'it' parameter works fine:
@CompileStatic class TestType { static def bar(Object b) { b.with { assert it instanceof String it.toUpperCase() } } }
Attachments
Issue Links
- is duplicated by
-
GROOVY-6888 Static type checking fails if I change the closure input parameter name
- Closed