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

Invalid generic cast generated in super constructor call in a Java stub

    XMLWordPrintableJSON

Details

    Description

      For this Groovy class:

      class TaggedsMap extends TreeMap {
      
          TaggedsMap() { super() }
      
          TaggedsMap(Comparator comparator) { super(comparator)}
      
          TaggedsMap(Map m) {
              super()
              putAll( m)
          }
      
          TaggedsMap(SortedMap m) {
              super()
              putAll (m)
          }
      }
      

      The following stub is generated:

      public class TaggedsMap
        extends java.util.TreeMap  implements
          groovy.lang.GroovyObject {
      public TaggedsMap
      () {
      super ((java.util.SortedMap<K, java.lang.Object extends V>)null);
      }
      public TaggedsMap
      (java.util.Comparator comparator) {
      super ((java.util.SortedMap<K, java.lang.Object extends V>)null);
      }
      public TaggedsMap
      (java.util.Map m) {
      super ((java.util.SortedMap<K, java.lang.Object extends V>)null);
      }
      public TaggedsMap
      (java.util.SortedMap m) {
      super ((java.util.SortedMap<K, java.lang.Object extends V>)null);
      }
      }
      

      which isn't a valid Java code.

      Please refer to http://youtrack.jetbrains.com/issue/IDEA-97668 for the full project to reproduce.

      Attachments

        Activity

          People

            melix Cédric Champeau
            gromopetr Peter Gromov
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: