[ 
https://issues.apache.org/jira/browse/GROOVY-10424?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Eric Milles updated GROOVY-10424:
---------------------------------
    Labels: StackOverflowError  (was: )

> SC: stack overflow for optimized boolean on inner class with inner class(es)
> ----------------------------------------------------------------------------
>
>                 Key: GROOVY-10424
>                 URL: https://issues.apache.org/jira/browse/GROOVY-10424
>             Project: Groovy
>          Issue Type: Bug
>          Components: Static compilation
>    Affects Versions: 4.0.0-rc-1
>            Reporter: Eric Milles
>            Assignee: Eric Milles
>            Priority: Major
>              Labels: StackOverflowError
>
> When using static compilation and checking a private inner class for groovy 
> truth, a stack overflow is possible within 
> {{BooleanExpressionTransformer#isExtended}}.
> {code:groovy}
> @groovy.transform.CompileStatic
> class Outer {
>   private static class Inner {
>     private Inner() { // triggers creation of Inner$1 in 
> StaticCompilationVisitor$addPrivateBridgeMethods
>     }
>   }
>   void test() {
>     def inner = new Inner()
>     if (inner) { // optimized boolean expression; StackOverflowError
>       print 'works'
>     }
>   }
> }
> new Outer().test()
> {code}
> {code:groovy}
> @groovy.transform.CompileStatic
> class Outer {
>   private static class Inner {
>     static class Three {}
>   }
>   void test() {
>     def inner = new Inner()
>     if (inner) { // optimized boolean expression; StackOverflowError
>       print 'works'
>     }
>   }
> }
> new Outer().test()
> {code}



--
This message was sent by Atlassian Jira
(v8.20.1#820001)

Reply via email to