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

Type checking of method calls using generics and default values is not supported

    XMLWordPrintableJSON

Details

    Description

      Imagine a method with the following signature:

      def foo(List<? extends A> arg, String value='default')
      

      And a method call:

      foo(a)
      

      Then in that case, the type checker will not verify that for argument a, the generics match the signature (only that a is a List).

      A method call with all arguments set will not have this limitation.

      Attachments

        Activity

          People

            blackdrag Jochen Theodorou
            melix Cédric Champeau
            Votes:
            1 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: