Uploaded image for project: 'Groovy'
  1. Groovy
  2. GROOVY-10419

STC: stack overflow for elvis assignment with explicit setter

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Fixed
    • None
    • 3.0.10, 4.0.0-rc-2
    • None
    • None

    Description

      Consider the following:

      class C {
        def p
        void setP(p) {
          this.p = p
        }
      }
      @groovy.transform.TypeChecked
      void test(C c) {
        c.p ?= 'x'
      }
      test(new C())
      

      Elvis assignment overflows stack in STC's ensureValidSetter.

      https://github.com/groovy/groovy-eclipse/issues/1320

      Attachments

        Issue Links

          Activity

            People

              emilles Eric Milles
              emilles Eric Milles
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: