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

STC: no type parameter inference for variadic method called with fewer arguments than parameters

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

Details

    Description

      Consider the following:

      def <T> T m(T t, ... zeroOrMore) {
      }
      def obj = m(42)
      

      When method "m" is called with just one argument, STC does not infer the type of "T".

      Attachments

        Activity

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

          People

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

            Dates

              Created:
              Updated:
              Resolved:

              Slack

                Issue deployment