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

STC: support spread operator for list literals

    XMLWordPrintableJSON

Details

    Description

      Consider the following:

      void test(List<String> list) { }
      List<String> strings = ['y','z']
      test(['x', *strings])
      

      STC infers wring type for "*strings" which prevents the use of spread for list literals.

      Attachments

        Issue Links

          Activity

            People

              emilles Eric Milles
              emilles Eric Milles
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: