[
https://issues.apache.org/jira/browse/GROOVY-12304?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=18108518#comment-18108518
]
Björn Kautler commented on GROOVY-12304:
----------------------------------------
Forgot to mention.
If this is or should be intended behavior, at least the error message should be
improved, because it is
{code:java}
No such property: null for class: java.util.LinkedHashMap {code}
> STC: Map access with dynamic key in dot-syntax does not compile
> ---------------------------------------------------------------
>
> Key: GROOVY-12304
> URL: https://issues.apache.org/jira/browse/GROOVY-12304
> Project: Groovy
> Issue Type: Bug
> Affects Versions: 6.0.0-alpha-1, 5.0.3, 4.0.31
> Reporter: Björn Kautler
> Priority: Major
>
> This does not compile:
> {code:java}
> @groovy.transform.CompileStatic
> class Foo {
> def foo(bar) {
> println([a: 1]."a${''}")
> }
> }
> new Foo().foo("foo") {code}
> with square brackets syntax it compiles and works from Groovy 5 on.
--
This message was sent by Atlassian Jira
(v8.20.10#820010)