[ 
https://issues.apache.org/jira/browse/GROOVY-12315?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=18133843#comment-18133843
 ] 

ASF GitHub Bot commented on GROOVY-12315:
-----------------------------------------

testlens-app[bot] commented on PR #3069:
URL: https://github.com/apache/groovy/pull/3069#issuecomment-6481031371

   ## ✅ All tests passed ✅
   
   🏷️ Commit: 9aff9ee600faa0f539cdb37a4314dc8c405db499
   ▶️ Tests:  124230 executed
   ⚪️ Checks: 32/32 completed
   
   ---
   _Learn more about TestLens at 
[testlens.app/docs](https://testlens.app/docs/features/pr-comment/)._
   




> 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)

Reply via email to