[
https://issues.apache.org/jira/browse/GROOVY-12315?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=18134578#comment-18134578
]
ASF GitHub Bot commented on GROOVY-12315:
-----------------------------------------
daniellansun commented on PR #3069:
URL: https://github.com/apache/groovy/pull/3069#issuecomment-6512632005
Friendly ping: CI is green and this is ready for review. If there are no
objections, I plan to merge it this weekend. Thanks!
> Type for final field should be known by flow-typing
> ---------------------------------------------------
>
> Key: GROOVY-12315
> URL: https://issues.apache.org/jira/browse/GROOVY-12315
> Project: Groovy
> Issue Type: Bug
> Affects Versions: 6.0.0-alpha-1, 5.0.3, 4.0.31
> Reporter: Björn Kautler
> Assignee: Daniel Sun
> Priority: Major
>
> This does not compile, while the type should be clear as the field is final:
> {code:java}
> @groovy.transform.CompileStatic
> class Foo {
> final bar = ''
> def foo() {
> println(bar.length())
> }
> }
> new Foo().foo() {code}
> With a local variable it works even without {{{}final{}}}.
--
This message was sent by Atlassian Jira
(v10.3.26#10030026)