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

VerifyError for nested class this call to static method

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: 2.5.0-beta-1
    • Fix Version/s: 2.5.0-beta-2
    • Component/s: None
    • Labels:
      None

      Description

      class Base {
          static class Nested {
              private String b
              static String getData() { return "ABCD" }
              Nested() { this(getData()) }
              Nested(String b) { this.b = b }
              String toString() { b }
          }
      }
      assert new Base.Nested().toString() == 'ABCD'
      

      Results in

      java.lang.VerifyError: (class: Base$Nested, method: <init> signature: ()V) Expecting to find object/array on stack.
      

      The same code works if a top-level class.

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                jwagenleitner John Wagenleitner
                Reporter:
                jwagenleitner John Wagenleitner
              • Votes:
                0 Vote for this issue
                Watchers:
                2 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: