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

STC: multiple-assignment from tuple-bearing static method

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Minor
    • Resolution: Fixed
    • None
    • 4.0.0-beta-1
    • Static Type Checker
    • None

    Description

      Follow up from GROOVY-8223 and GROOVY-8887. Consider the following:

      static Tuple2<String,Integer> make() {
        Tuple.tuple('answer', 42)
      }
      @groovy.transform.CompileStatic
      void test() {
        def (String string, Integer number) = make()
        println string
        println number
      }
      test()
      

      Destructuring of tuple fails for static method call expression.

      Attachments

        Activity

          People

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

            Dates

              Created:
              Updated:
              Resolved: