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

DefaultGroovyMethods class's plus(T[] left, xxxx<T> right) have ambiguous errors

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Trivial
    • Resolution: Duplicate
    • 2.4.3
    • None
    • syntax
    • OS: Arch Linux
      Kernel: x86_64 Linux 3.19.3-3-ARCH
      CPU: Intel Core i7-3770S CPU @ 3.9GHz
      GPU: GeForce GT 640M
      RAM: 7875MB

      Using IntelliJ IDEA 1:14.1.1-1
    • Patch

    Description

      Trying to use the `groovy.transform.etc` for the first time. When I run it, all works well until it gets to `org.codehaus.groovy.runtime.DefaultGroovyMethods.java`

      There are a few problems with how the `public static <T> T[] plug(T[] left, xxx right)` method. Where xxx is T[], Iterable<T> right, or Collection<T> right.

      In all of these cases, you just need to change the `return (T[]) plus(...).toArray();` to `return (T[]) plus((Collection<T>)...).toArray();

      Problem solved.

      Attachments

        Issue Links

          Activity

            People

              Unassigned Unassigned
              czipperz Czipperz
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:

                Time Tracking

                  Estimated:
                  Original Estimate - 2m
                  2m
                  Remaining:
                  Remaining Estimate - 2m
                  2m
                  Logged:
                  Time Spent - Not Specified
                  Not Specified