groovy
  1. groovy
  2. GROOVY-5259

VerifyError - cannot access outer class static final fields from an inner class

    Details

    • Type: Bug Bug
    • Status: Closed Closed
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: 1.8.5
    • Fix Version/s: 1.8.6, 2.0-beta-3
    • Component/s: Compiler
    • Labels:
      None
    • Testcase included:
      yes
    • Number of attachments :
      2

      Description

      Trying to access an outer class 'constant' (i.e. static final) from within an inner class results in a java.lang.VerifyError.

      The problem only manifests if the inner class is extending something; if it is not extending another class, access to the outer class member will work.

      1. Groovy5259Bug.groovy
        2 kB
        CÚdric Champeau
      2. InnerAccessOuter.groovy
        0.7 kB
        Jay Ashworth

        Activity

        Hide
        CÚdric Champeau added a comment -

        Attaching an alternate test case showing that the problem is more likely related to the inner class constructor.

        Show
        CÚdric Champeau added a comment - Attaching an alternate test case showing that the problem is more likely related to the inner class constructor.
        Show
        CÚdric Champeau added a comment - See https://github.com/groovy/groovy-core/commit/26d4ad70154b14e2ea5e45099bc77ae5f11305c7

          People

          • Assignee:
            CÚdric Champeau
            Reporter:
            Jay Ashworth
          • Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved: