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

Map delegate within @CompileStatic

    Details

      Description

      @CompileStatic
      class Main {
        static void main(String[] args) {
          def map = [a: 1, b: 2]
          map.with { // Exception in thread "main" java.lang.ClassCastException: java.util.LinkedHashMap cannot be cast to groovy.lang.GroovyObject
            println a
          }
        }
      }
      

        Attachments

          Activity

            People

            • Assignee:
              paulk Paul King
              Reporter:
              daniilo Daniil Ovchinnikov
            • Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: