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

Groovy3 doesn't parse a function property when there's a new line between return value and function name

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

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Fixed
    • None
    • 3.0.8, 4.0.0-alpha-3
    • None
    • None

    Description

      The follow code compiles fine on groovy 2, but fails on groovy 3

      public synchronized ImmutableMap<String,Pair<String,Double>> 
      a(
               List<String> params,
               List<String> columnMapping)
           {
      return null;
      }
      
      public class Pair<T, U> {}
      public class ImmutableMap<T, U> {}
      

      error msg

      
       
      1 compilation error:
      
      Unexpected input: 'public synchronized ImmutableMap<String,Pair<String,Double>> \n' at line: 1, column: 62
      

      Attachments

        Activity

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

          People

            daniel_sun Daniel Sun
            howardzzhang Howard
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Slack

                Issue deployment