You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@groovy.apache.org by "Daniil Ovchinnikov (JIRA)" <ji...@apache.org> on 2017/02/06 18:07:41 UTC

[jira] [Created] (GROOVY-8073) Map delegate within @CompileStatic

Daniil Ovchinnikov created GROOVY-8073:
------------------------------------------

             Summary: Map delegate within @CompileStatic
                 Key: GROOVY-8073
                 URL: https://issues.apache.org/jira/browse/GROOVY-8073
             Project: Groovy
          Issue Type: Bug
          Components: Static compilation
    Affects Versions: 2.4.8
            Reporter: Daniil Ovchinnikov


{code}
@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
    }
  }
}
{code}



--
This message was sent by Atlassian JIRA
(v6.3.15#6346)