Details
-
Bug
-
Status: Closed
-
Major
-
Resolution: Fixed
-
2.5.0-rc-3
-
None
Description
The following code report a compilation error:
@CompileStatic class Test { List<Foo> foo() { return [] } List<String> bar() { return foo().collect { Foo it -> it.instanceId } } } @CompileStatic class Foo { String instanceId }
Error message
Test.groovy: 36: Expected parameter of type java.lang.String but got nextflow.Foo @ line 36, column 32. return foo().collect { Foo it -> it.instanceId } ^ Test.groovy: 36: [Static type checking] - No such property: instanceId for class: java.lang.String @ line 36, column 42. urn foo().collect { Foo it -> it.instanc
Attachments
Issue Links
- is related to
-
GROOVY-8590 STC incorrectly infers type of nested method call used in a return stmt
- Closed
- links to