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

Multiple Return Values @CompileStatic Tuple#<> working

    XMLWordPrintableJSON

Details

    • New Feature
    • Status: Closed
    • Major
    • Resolution: Fixed
    • None
    • 3.0.0-beta-3
    • Compiler
    • None

    Description

      @COmpileStatic seems to bomb with 2.4 if I have:

      1) a static util function such as:

      class blah {
      static Tuple2<String,Integer> dostuff()

      { new Tuple2<>("string",55) }

      }

      2) invoke via:

      def (String mystr, Integer myint) = dostuff()

      With @CompileStatic, that all bombs.

      Alternatively, tried using getAt overrides, also did not work, but that would lack typing infor necessary for @CompileStatic. But the Tuple2 should have the necessary type info...

      I would think this could be done... I might try to do it, but I'd like to file the issue

      Attachments

        Issue Links

          Activity

            People

              daniel_sun Daniel Sun
              cowardlydragon Constance Eustace
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:

                Time Tracking

                  Estimated:
                  Original Estimate - Not Specified
                  Not Specified
                  Remaining:
                  Remaining Estimate - 0h
                  0h
                  Logged:
                  Time Spent - 20m
                  20m