You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@groovy.apache.org by "Eric Milles (Jira)" <ji...@apache.org> on 2021/10/22 19:49:00 UTC

[jira] [Created] (GROOVY-10326) STC: no error for map*.key = x

Eric Milles created GROOVY-10326:
------------------------------------

             Summary: STC: no error for map*.key = x
                 Key: GROOVY-10326
                 URL: https://issues.apache.org/jira/browse/GROOVY-10326
             Project: Groovy
          Issue Type: Bug
          Components: Static Type Checker
            Reporter: Eric Milles


Consider the following:
{code:groovy}
@groovy.transform.TypeChecked
void test(Map map) {
  map*.key = null
}
{code}

"key" is a read-only property of Map.Entry; however this is caught at run-time rather than compile time.



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