[
https://issues.apache.org/jira/browse/GROOVY-7987?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15627914#comment-15627914
]
ASF GitHub Bot commented on GROOVY-7987:
----------------------------------------
GitHub user paulk-asert opened a pull request:
https://github.com/apache/groovy/pull/456
GROOVY-7987: Type checker doesn't flag static method calls to instanc…
…e methods with otherwise the same signature
You can merge this pull request into a Git repository by running:
$ git pull https://github.com/paulk-asert/groovy groovy7987
Alternatively you can review and apply these changes as the patch at:
https://github.com/apache/groovy/pull/456.patch
To close this pull request, make a commit to your master/trunk branch
with (at least) the following in the commit message:
This closes #456
----
commit f9e6fd9f1be5f6ee3e63414fdb0994743c32b97f
Author: paulk <[email protected]>
Date: 2016-11-02T06:17:25Z
GROOVY-7987: Type checker doesn't flag static method calls to instance
methods with otherwise the same signature
----
> 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
>
> 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.4#6332)