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

STC: map putAll fails to match "?" to "Object"

    XMLWordPrintableJSON

Details

    Description

      Consider the following:

      @groovy.transform.TypeChecked
      class C {
        Map<String,Object> map
        void test(Map<? extends String, ?> m) {
          map.putAll(m)
        }
      }
      

      javac allows putAll in this situation. groovyc emits an error: Cannot call java.util.Map#putAll(java.util.Map<? extends java.lang.String, ? extends java.lang.Object>) with arguments [java.util.Map<? extends java.lang.String, ?>]

      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: