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

[PATCH] AstBuilderFromSpecificationTest.testFieldExpression sets an incorrect modifier to FieldNode

Attach filesAttach ScreenshotVotersWatch issueWatchersCreate sub-taskLinkCloneUpdate Comment AuthorReplace String in CommentUpdate Comment VisibilityDelete Comments
    XMLWordPrintableJSON

Details

    • Test
    • Status: Closed
    • Major
    • Resolution: Fixed
    • None
    • 1.9-beta-4, 1.8.4
    • ast builder
    • None
    • 1.9.0-beta-4-SNAPSHOT
    • Patch

    Description

      The code try to set the modifier to "public static" but

      ACC_PUBLIC & ACC_STATIC

      means NOTHING:

          public void testFieldExpression() {
              // public static String foo = "a value"
              def result = new AstBuilder().buildFromSpec {
                  field {
                      fieldNode "foo", ACC_PUBLIC & ACC_STATIC, String, this.class, {
                          constant "a value"
                      }
                  }
              }
      

      Attachments

        Activity

          This comment will be Viewable by All Users Viewable by All Users
          Cancel

          People

            guillaume Guillaume Sauthier
            nagai_masato Masato Nagai
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Slack

                Issue deployment