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

Set isSynthetic()/setSynthetic() behaviour right for AST nodes

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Open
    • Major
    • Resolution: Unresolved
    • 1.8-beta-1
    • None
    • class generator
    • None

    Description

      Currently there is no relation between the very interdependent properties - synthetic of AnnotatedNode and modifiers of various sub-classes like MethodNode, FieldNode, etc - which means that if the developer remembers to call one but forgets another, it leaves the AST in an inconsistent state. It can have synthetic == true but modifiers with SYNTHETIC bit off and vice versa.

      This leads to issues at various places currently because fields, methods, classes that were intended to be synthetic don't necessarily get marked so in the bytecode.

      For the nodes that have modifiers, isSynthetic()/setSynthetic()/setModifiers() should all be in sync - only based on modifiers value behind the scenes.

      Attachments

        Issue Links

          Activity

            People

              Unassigned Unassigned
              roshandawrani Roshan Dawrani
              Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

              Dates

                Created:
                Updated: