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 2017/02/01 23:19:06 UTC
[jira] [Closed] (GROOVY-7987) Type checker doesn't flag static
method calls to instance methods with otherwise the same signature
[ https://issues.apache.org/jira/browse/GROOVY-7987?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Paul King closed GROOVY-7987.
-----------------------------
> Type checker doesn't flag static method calls to instance methods with otherwise the same signature
> ---------------------------------------------------------------------------------------------------
>
> Key: GROOVY-7987
> URL: https://issues.apache.org/jira/browse/GROOVY-7987
> Project: Groovy
> Issue Type: Bug
> Components: Static Type Checker
> Reporter: Paul King
> Assignee: Paul King
> Fix For: 2.4.8
>
>
> Example code which fails at runtime but should fail at compile time:
> {code}
> class Foo {
> def bar() {}
> }
> @groovy.transform.TypeChecked // MME at runtime, the same as dynamic groovy
> //@groovy.transform.CompileStatic // would give GroovyCastException at runtime
> def method() {
> Foo.bar()
> }
> method()
> {code}
--
This message was sent by Atlassian JIRA
(v6.3.15#6346)