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

STC: instanceof and DGM each(Map,Closure)

    XMLWordPrintableJSON

Details

    Description

      Similar to GROOVY-10179, STC is not inferring the type of map entry through instanceof. Consider the following:

      @groovy.transform.TypeChecked
      void test(args) {
        if (args instanceof Map) {
          args.each { e ->
            println "$e.key $e.value"
          }
        }
      }
      test(a:1,b:2,c:3.14)
      

      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: