[ 
https://issues.apache.org/jira/browse/GROOVY-9759?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17201876#comment-17201876
 ] 

Paul King commented on GROOVY-9759:
-----------------------------------

Git bisect indicates that the following commit caused this change:
https://github.com/apache/groovy/commit/8bd69f46300

> CLONE - Regression for accessing private static constants in closures from Map
> ------------------------------------------------------------------------------
>
>                 Key: GROOVY-9759
>                 URL: https://issues.apache.org/jira/browse/GROOVY-9759
>             Project: Groovy
>          Issue Type: Bug
>    Affects Versions: 3.0.5
>            Reporter: Leonard Brünings
>            Priority: Major
>
> This is a follow-on from GROOVY-9695.
> The following code works in 3.0.4 but fails with a STC error in 3.0.5:
> {code:groovy}
> import java.util.regex.Pattern
> import groovy.transform.CompileStatic
> @CompileStatic
> class Foo {
>     private static final Pattern PATTERNS = ~/.*Test/
>     def checkMap() {
>         Map failures = [:]
>         def closure = {
>             println PATTERNS.pattern()       // STC okay here
>             failures[PATTERNS.pattern()] = 1     // <== STC fails here
>         }
>         closure()
>         println failures
>     }
> }
> new Foo().checkMap()
> {code}



--
This message was sent by Atlassian Jira
(v8.3.4#803005)

Reply via email to