[
https://issues.apache.org/jira/browse/GROOVY-8074?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16005521#comment-16005521
]
ASF GitHub Bot commented on GROOVY-8074:
----------------------------------------
Github user paulk-asert commented on a diff in the pull request:
https://github.com/apache/groovy/pull/539#discussion_r115862393
--- Diff:
src/test/org/codehaus/groovy/classgen/asm/sc/ArraysAndCollectionsStaticCompileTest.groovy
---
@@ -128,6 +128,18 @@ class ArraysAndCollectionsStaticCompileTest extends
ArraysAndCollectionsSTCTest
}
}
+ void testMapSubclassPropertyStyleAccess() {
--- End diff --
maybe add in:
`// GROOVY-8074`
> @CompileStatic class property accessed instead of map property
> --------------------------------------------------------------
>
> Key: GROOVY-8074
> URL: https://issues.apache.org/jira/browse/GROOVY-8074
> Project: Groovy
> Issue Type: Bug
> Components: Static compilation
> Affects Versions: 2.4.8
> Reporter: Daniil Ovchinnikov
>
> {code}
> class MyMap extends LinkedHashMap {
> def foo = 1
> }
> @CompileStatic
> class Main {
> static void main(String[] args) {
> def map = new MyMap()
> map.put('foo', 42)
> println map.foo // 1 is printed, should be 42
> }
> }
> {code}
--
This message was sent by Atlassian JIRA
(v6.3.15#6346)