You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@groovy.apache.org by "Paul King (Jira)" <ji...@apache.org> on 2020/11/11 02:02:05 UTC

[jira] [Closed] (GROOVY-9463) STC: no type check error for invalid method pointer or reference

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

Paul King closed GROOVY-9463.
-----------------------------

> STC: no type check error for invalid method pointer or reference
> ----------------------------------------------------------------
>
>                 Key: GROOVY-9463
>                 URL: https://issues.apache.org/jira/browse/GROOVY-9463
>             Project: Groovy
>          Issue Type: Bug
>          Components: Static Type Checker
>            Reporter: Eric Milles
>            Assignee: Eric Milles
>            Priority: Minor
>             Fix For: 4.0.0-alpha-1, 3.0.6
>
>
> Consider the following:
> {code:groovy}
> @groovy.transform.TypeChecked
> void test() {
>   def closure = String.&toLowerCaseX
>   java.util.function.Function<String,String> reference = String::toLowerCaseX
> }
> {code}
> Neither of these misspellings result in a compiler error.  Also no metadata is saved in the AST to understand what method is being referenced if the names are fixed.



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