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

STC: infer closure/lambda parameter types for return expression

    XMLWordPrintableJSON

Details

    • Improvement
    • Status: Closed
    • Major
    • Resolution: Fixed
    • None
    • 4.0.4, 3.0.20
    • Static Type Checker
    • None

    Description

      Consider the following:

      import java.util.function.BiConsumer
      
      @groovy.transform.TypeChecked
      def BiConsumer<String, List<?>> m() {
        return (text, list) -> {
          // ...
        }
      }
      

      The types of "text" and "list" are not known and errors occur for String or List method calls.

      https://github.com/groovy/groovy-eclipse/issues/1327
      https://github.com/groovy/groovy-eclipse/issues/1373

      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: