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

    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

          People

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

            Dates

              Created:
              Updated:
              Resolved: