Eric Milles created GROOVY-9735:
-----------------------------------

             Summary: STC: incorrect error for actual vs inferred closure 
parameter type
                 Key: GROOVY-9735
                 URL: https://issues.apache.org/jira/browse/GROOVY-9735
             Project: Groovy
          Issue Type: Bug
            Reporter: Eric Milles
            Assignee: Eric Milles


Follow up from GROOVY-9570.  When the method is not a DGM, there is a slightly 
different path through STC and the same error is currently given.

{code:groovy}
import groovy.transform.stc.*
@groovy.transform.TypeChecked
class C<I extends Item> {
  Queue<I> queue
  def c = { ->
    x(queue) { I item ->
      println item
    }
  }
  def m() {
    x(queue) { I item ->
      println item
    }
  }
  def <T> T x(Collection<T> y, @ClosureParams(FirstParam.FirstGenericType) 
Closure<?> z) {
  }
}
interface Item {}
new C()
{code}

Both instances of "I item" are flagged with the same error described in 
GROOVY-9570



--
This message was sent by Atlassian Jira
(v8.3.4#803005)

Reply via email to