You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@groovy.apache.org by "Eric Milles (Jira)" <ji...@apache.org> on 2021/12/17 00:18:00 UTC

[jira] [Resolved] (GROOVY-10419) STC: stack overflow for elvis assignment with explicit setter

     [ https://issues.apache.org/jira/browse/GROOVY-10419?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Eric Milles resolved GROOVY-10419.
----------------------------------
    Fix Version/s: 4.0.0-rc-2
       Resolution: Fixed

https://github.com/apache/groovy/commit/2dd2144292d4d8b291700370d0f21b8379462bc9

> STC: stack overflow for elvis assignment with explicit setter
> -------------------------------------------------------------
>
>                 Key: GROOVY-10419
>                 URL: https://issues.apache.org/jira/browse/GROOVY-10419
>             Project: Groovy
>          Issue Type: Bug
>            Reporter: Eric Milles
>            Assignee: Eric Milles
>            Priority: Major
>             Fix For: 4.0.0-rc-2
>
>
> Consider the following:
> {code:groovy}
> class C {
>   def p
>   void setP(p) {
>     this.p = p
>   }
> }
> @groovy.transform.TypeChecked
> void test(C c) {
>   c.p ?= 'x'
> }
> test(new C())
> {code}
> Elvis assignment overflows stack in STC's {{ensureValidSetter}}.
> https://github.com/groovy/groovy-eclipse/issues/1320



--
This message was sent by Atlassian Jira
(v8.20.1#820001)