Uploaded image for project: 'Groovy'
  1. Groovy
  2. GROOVY-2503 MOP 2.0 design inflluencing issues
  3. GROOVY-5855

Calling "get" method works but accessing property doesn't on GString

Attach filesAttach ScreenshotVotersWatch issueWatchersLinkCloneUpdate Comment AuthorReplace String in CommentUpdate Comment VisibilityDelete Comments
    XMLWordPrintableJSON

Details

    • Sub-task
    • Status: Closed
    • Minor
    • Resolution: Duplicate
    • 1.8.7, 2.0.5
    • None
    • None
    • None

    Description

      def s = 'abc'
      "$s".getBytes() works as expected, but "$s".bytes throws a MissingPropertyException. Both work properly on regular strings.

      Attachments

        Activity

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

          People

            blackdrag Jochen Theodorou
            kousen Ken Kousen
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Slack

                Issue deployment