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

stackoverflow with compilestatic

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Minor
    • Resolution: Fixed
    • 2.0.5
    • 2.0.6
    • Static compilation
    • None

    Description

      Reported to groovy-eclipse as https://jira.codehaus.org/browse/GRECLIPSE-1514. This code:

      @CompileStatic
      class C {
        def xxx(List list) {
          list.unique().each { }
        }
      }
      

      will stackoverflow

      java.lang.StackOverflowError
      	at java.util.HashMap.getEntry(HashMap.java:344)
      	at java.util.HashMap.containsKey(HashMap.java:335)
      	at org.codehaus.groovy.transform.stc.StaticTypeCheckingVisitor.fullyResolve(StaticTypeCheckingVisitor.java:2834)
      	at org.codehaus.groovy.transform.stc.StaticTypeCheckingVisitor.fullyResolveType(StaticTypeCheckingVisitor.java:2862)
      	at org.codehaus.groovy.transform.stc.StaticTypeCheckingVisitor.fullyResolve(StaticTypeCheckingVisitor.java:2838)
      	at org.codehaus.groovy.transform.stc.StaticTypeCheckingVisitor.fullyResolveType(StaticTypeCheckingVisitor.java:2862)
      	at org.codehaus.groovy.transform.stc.StaticTypeCheckingVisitor.fullyResolve(StaticTypeCheckingVisitor.java:2838)
      	at org.codehaus.groovy.transform.stc.StaticTypeCheckingVisitor.fullyResolveType(StaticTypeCheckingVisitor.java:2862)
      ...
      

      Attachments

        Activity

          People

            melix Cédric Champeau
            aclement Andy Clement
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: