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/16 23:17:00 UTC

[jira] [Updated] (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 updated GROOVY-10419:
---------------------------------
    Description: 
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

  was:
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}}.


> 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
>            Priority: Major
>
> 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)